Method RaiseL
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
The method Raise has a boolean flag argument $aHalt, which is a certain sign of a Single Responsibility Principle violation. Open
public static function Raise($aMsg, $aHalt = true)
- 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 SetImageFlag has a boolean flag argument $aFlg, which is a certain sign of a Single Responsibility Principle violation. Open
public static function SetImageFlag($aFlg = true)
- 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 unused parameters such as '$aHalt'. Open
public static function Raise($aMsg, $aHalt = true)
- Read upRead up
- Exclude checks
UnusedFormalParameter
Since: 0.2
Avoid passing parameters to methods or constructors and then not using those parameters.
Example
class Foo
{
private function bar($howdy)
{
// $howdy is not used
}
}
Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter
Avoid variables with short names like $a4. Configured minimum length is 3. Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $a2. Configured minimum length is 3. Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $a5. Configured minimum length is 3. Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $a3. Configured minimum length is 3. Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Avoid variables with short names like $a1. Configured minimum length is 3. Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
- Read upRead up
- Exclude checks
ShortVariable
Since: 0.2
Detects when a field, local, or parameter has a very short name.
Example
class Something {
private $q = 15; // VIOLATION - Field
public static function main( array $as ) { // VIOLATION - Formal
$r = 20 + $this->q; // VIOLATION - Local
for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
$r += $this->q;
}
}
}
Source https://phpmd.org/rules/naming.html#shortvariable
Method name "JpGraphError::SetTitle" is not in camel caps format Open
public static function SetTitle($aTitle)
- Exclude checks
Method name "JpGraphError::GetTitle" is not in camel caps format Open
public static function GetTitle()
- Exclude checks
Method name "JpGraphError::SetErrLocale" is not in camel caps format Open
public static function SetErrLocale($aLoc)
- Exclude checks
Method name "JpGraphError::SetLogFile" is not in camel caps format Open
public static function SetLogFile($aFile)
- Exclude checks
Property name "$__iLogFile" should not be prefixed with an underscore to indicate visibility Open
private static $__iLogFile = '';
- Exclude checks
Method name "JpGraphError::RaiseL" is not in camel caps format Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
- Exclude checks
Method name "JpGraphError::SetImageFlag" is not in camel caps format Open
public static function SetImageFlag($aFlg = true)
- Exclude checks
Property name "$__iTitle" should not be prefixed with an underscore to indicate visibility Open
private static $__iTitle = 'JpGraph Error: ';
- Exclude checks
Method name "JpGraphError::GetImageFlag" is not in camel caps format Open
public static function GetImageFlag()
- Exclude checks
Property name "$__iImgFlg" should not be prefixed with an underscore to indicate visibility Open
private static $__iImgFlg = true;
- Exclude checks
Method name "JpGraphError::Raise" is not in camel caps format Open
public static function Raise($aMsg, $aHalt = true)
- Exclude checks
Method name "JpGraphError::GetLogFile" is not in camel caps format Open
public static function GetLogFile()
- Exclude checks