Showing 720 of 720 total issues
Avoid too many return
statements within this method. Open
return "0.0";
Avoid too many return
statements within this method. Open
return @$geoData->geoplugin_regionName;
Avoid too many return
statements within this method. Open
return $geoData;
The method start has a boolean flag argument $useCookie, which is a certain sign of a Single Responsibility Principle violation. Open
public static function start($name = "", array $iniSettings = [], $useCookie = false,
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid too many return
statements within this method. Open
return $value;
Avoid too many return
statements within this method. Open
return null;
Missing class import via use statement (line '57', column '23'). Open
throw new \Exception("Invalid email: '" . $user->email . "'");
- 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
Avoid too many return
statements within this method. Open
return 'E_CORE_ERROR';
Avoid too many return
statements within this method. Open
return 'E_RECOVERABLE_ERROR';
Avoid too many return
statements within this method. Open
return "";
Missing class import via use statement (line '61', column '27'). Open
throw new \Exception("Invalid view template");
- 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
Avoid too many return
statements within this method. Open
return $this->setFieldValue($fieldName, $fieldValue);
Avoid too many return
statements within this method. Open
return 'E_CORE_WARNING';
The method http_redirect has a boolean flag argument $session, which is a certain sign of a Single Responsibility Principle violation. Open
function http_redirect($url, $params = array(), $session = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid too many return
statements within this method. Open
return @json_decode($response, true);
Avoid too many return
statements within this method. Open
return 'E_USER_NOTICE';
Avoid too many return
statements within this method. Open
return 'E_DEPRECATED';
The method http_redirect has a boolean flag argument $session, which is a certain sign of a Single Responsibility Principle violation. Open
public static function http_redirect($url, $params = [], $session = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
The method getAvatarPath has a boolean flag argument $icon, which is a certain sign of a Single Responsibility Principle violation. Open
public function getAvatarPath($icon = false) {
- Read upRead up
- Exclude checks
BooleanArgumentFlag
Since: 1.4.0
A boolean flag argument is a reliable indicator for a violation of the Single Responsibility Principle (SRP). You can fix this problem by extracting the logic in the boolean flag into its own class or method.
Example
class Foo {
public function bar($flag = true) {
}
}
Source https://phpmd.org/rules/cleancode.html#booleanargumentflag
Avoid too many return
statements within this method. Open
return null;