Method SetConstrain
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public function SetConstrain($aRow, $aType, $aColor = 'black', $aArrowSize = ARROW_S2, $aArrowType = ARROWT_SOLID)
Avoid unused parameters such as '$aImg'. Open
public function GetAbsHeight($aImg)
- 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 using static access to class '\Amenadiel\JpGraph\Util\JpGraphError' in method 'SetCSIMTarget'. Open
Util\JpGraphError::RaiseL(6025, $tv);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Amenadiel\JpGraph\Util\JpGraphError' in method 'SetCSIMTarget'. Open
Util\JpGraphError::RaiseL(6024, $tv);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid using static access to class '\Amenadiel\JpGraph\Util\JpGraphError' in method 'SetCSIMAlt'. Open
Util\JpGraphError::RaiseL(6025, $tv);
- Read upRead up
- Exclude checks
StaticAccess
Since: 1.4.0
Static access causes unexchangeable dependencies to other classes and leads to hard to test code. Avoid using static access at all costs and instead inject dependencies through the constructor. The only case when static access is acceptable is when used for factory methods.
Example
class Foo
{
public function bar()
{
Bar::baz();
}
}
Source https://phpmd.org/rules/cleancode.html#staticaccess
Avoid variables with short names like $xt. Configured minimum length is 3. Open
public function SetConstrainPos($xt, $yt, $xb, $yb)
- 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 $tv. Configured minimum length is 3. Open
$tv = substr(var_export($aTarget, true), 0, 40);
- 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 $tv. Configured minimum length is 3. Open
$tv = substr(var_export($aAlt, true), 0, 40);
- 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 $xb. Configured minimum length is 3. Open
public function SetConstrainPos($xt, $yt, $xb, $yb)
- 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 $yt. Configured minimum length is 3. Open
public function SetConstrainPos($xt, $yt, $xb, $yb)
- 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 $yb. Configured minimum length is 3. Open
public function SetConstrainPos($xt, $yt, $xb, $yb)
- 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 "GanttPlotObject::GetAbsHeight" is not in camel caps format Open
public function GetAbsHeight($aImg)
- Exclude checks
Method name "GanttPlotObject::SetCSIMTarget" is not in camel caps format Open
public function SetCSIMTarget($aTarget, $aAlt = '', $aWinTarget = '')
- Exclude checks
Method name "GanttPlotObject::SetCSIMAlt" is not in camel caps format Open
public function SetCSIMAlt($aAlt)
- Exclude checks
Method name "GanttPlotObject::GetMinDate" is not in camel caps format Open
public function GetMinDate()
- Exclude checks
Method name "GanttPlotObject::GetMaxDate" is not in camel caps format Open
public function GetMaxDate()
- Exclude checks
Method name "GanttPlotObject::GetCSIMArea" is not in camel caps format Open
public function GetCSIMArea()
- Exclude checks
Method name "GanttPlotObject::SetLabelLeftMargin" is not in camel caps format Open
public function SetLabelLeftMargin($aOff)
- Exclude checks
Method name "GanttPlotObject::StrokeActInfo" is not in camel caps format Open
public function StrokeActInfo($aImg, $aScale, $aYPos)
- Exclude checks
Method name "GanttPlotObject::SetConstrainPos" is not in camel caps format Open
public function SetConstrainPos($xt, $yt, $xb, $yb)
- Exclude checks
Method name "GanttPlotObject::SetConstrain" is not in camel caps format Open
public function SetConstrain($aRow, $aType, $aColor = 'black', $aArrowSize = ARROW_S2, $aArrowType = ARROWT_SOLID)
- Exclude checks
Method name "GanttPlotObject::SetCaptionMargin" is not in camel caps format Open
public function SetCaptionMargin($aMarg)
- Exclude checks
Method name "GanttPlotObject::GetLineNbr" is not in camel caps format Open
public function GetLineNbr()
- Exclude checks