src/graph/LineProperty.php
Method Stroke
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function Stroke($aImg, $aX1, $aY1, $aX2, $aY2)
The method Show has a boolean flag argument $aShow, which is a certain sign of a Single Responsibility Principle violation. Open
Open
public function Show($aShow = 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
Method name "LineProperty::SetWeight" is not in camel caps format Open
Open
public function SetWeight($aWeight)
- Exclude checks
Method name "LineProperty::SetColor" is not in camel caps format Open
Open
public function SetColor($aColor)
- Exclude checks
Method name "LineProperty::Show" is not in camel caps format Open
Open
public function Show($aShow = true)
- Exclude checks
Method name "LineProperty::Stroke" is not in camel caps format Open
Open
public function Stroke($aImg, $aX1, $aY1, $aX2, $aY2)
- Exclude checks
Method name "LineProperty::SetStyle" is not in camel caps format Open
Open
public function SetStyle($aStyle)
- Exclude checks