public/plugin/userremoteservice/src/user_remote_service_plugin.class.php
Missing class import via use statement (line '204', column '21'). Open
Open
$form = new FormValidator('deletionForm');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '236', column '26'). Open
Open
$table = new HTML_Table('class="table"');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Missing class import via use statement (line '184', column '21'). Open
Open
$form = new FormValidator('creationForm');
- Read upRead up
- Exclude checks
MissingImport
Since: 2.7.0
Importing all external classes in a file through use statements makes them clearly visible.
Example
function make() {
return new \stdClass();
}
Source http://phpmd.org/rules/cleancode.html#MissingImport
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
)->getCustomUserRedirectURL($userInfo['id'], $this->salt());
- Exclude checks
Method name "UserRemoteServicePlugin::get_hide_link_from_navigation_menu" is not in camel caps format Open
Open
public function get_hide_link_from_navigation_menu()
- Exclude checks
Missing class doc comment Open
Open
class UserRemoteServicePlugin extends Plugin
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
$this->getActiveServiceId()
- Exclude checks
The 'get_hide_link_from_navigation_menu()' method which returns a boolean should be named 'is...()' or 'has...()' Open
Open
public function get_hide_link_from_navigation_menu()
{
return $this->get('hide_link_from_navigation_menu');
}
- Read upRead up
- Exclude checks
BooleanGetMethodName
Since: 0.2
Looks for methods named 'getX()' with 'boolean' as the return type. The convention is to name these methods 'isX()' or 'hasX()'.
Example
class Foo {
/**
* @return boolean
*/
public function getFoo() {} // bad
/**
* @return bool
*/
public function isFoo(); // ok
/**
* @return boolean
*/
public function getFoo($bar); // ok, unless checkParameterizedMethods=true
}
Source https://phpmd.org/rules/naming.html#booleangetmethodname
Multi-line function call not indented correctly; expected 8 spaces but found 12 Open
Open
)->getCustomUserRedirectURL($userInfo['id'], $this->salt());
- Exclude checks
Multi-line function call not indented correctly; expected 12 spaces but found 16 Open
Open
$this->getActiveServiceId()
- Exclude checks
The method get_hide_link_from_navigation_menu is not named in camelCase. Open
Open
public function get_hide_link_from_navigation_menu()
{
return $this->get('hide_link_from_navigation_menu');
}
- Read upRead up
- Exclude checks
CamelCaseMethodName
Since: 0.2
It is considered best practice to use the camelCase notation to name methods.
Example
class ClassName {
public function get_name() {
}
}