HuasoFoundries/jpgraph

View on GitHub
src/plot/LegendStyle.php

Summary

Maintainability
A
0 mins
Test Coverage

The class LegendStyle has 23 fields. Consider redesigning LegendStyle to keep the number of fields under 15.
Open

class LegendStyle
{
    public $iLength           = 40;
    public $iMargin           = 20;
    public $iBottomMargin     = 5;
Severity: Minor
Found in src/plot/LegendStyle.php by phpmd

TooManyFields

Since: 0.1

Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

Example

class Person {
   protected $one;
   private $two;
   private $three;
   [... many more fields ...]
}

Source https://phpmd.org/rules/codesize.html#toomanyfields

The method Show has a boolean flag argument $aFlg, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function Show($aFlg = true)
Severity: Minor
Found in src/plot/LegendStyle.php by phpmd

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 Hide has a boolean flag argument $aFlg, which is a certain sign of a Single Responsibility Principle violation.
Open

    public function Hide($aFlg = true)
Severity: Minor
Found in src/plot/LegendStyle.php by phpmd

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 "LegendStyle::SetFontColor" is not in camel caps format
Open

    public function SetFontColor($aColor)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetTFontColor" is not in camel caps format
Open

    public function SetTFontColor($aColor)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::Show" is not in camel caps format
Open

    public function Show($aFlg = true)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetText" is not in camel caps format
Open

    public function SetText($aTxt)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetCFontColor" is not in camel caps format
Open

    public function SetCFontColor($aColor)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::Hide" is not in camel caps format
Open

    public function Hide($aFlg = true)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetCircleWeight" is not in camel caps format
Open

    public function SetCircleWeight($aWeight)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetCircleRadius" is not in camel caps format
Open

    public function SetCircleRadius($aRadius)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetCircleColor" is not in camel caps format
Open

    public function SetCircleColor($aColor)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetTFont" is not in camel caps format
Open

    public function SetTFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetLFontColor" is not in camel caps format
Open

    public function SetLFontColor($aColor)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetFont" is not in camel caps format
Open

    public function SetFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetCircleText" is not in camel caps format
Open

    public function SetCircleText($aTxt)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetMargin" is not in camel caps format
Open

    public function SetMargin($aMarg, $aBottomMargin = 5)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetLength" is not in camel caps format
Open

    public function SetLength($aLength)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetLFont" is not in camel caps format
Open

    public function SetLFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetCFont" is not in camel caps format
Open

    public function SetCFont($aFontFamily, $aFontStyle = FS_NORMAL, $aFontSize = 10)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

Method name "LegendStyle::SetFormat" is not in camel caps format
Open

    public function SetFormat($aFmt)
Severity: Minor
Found in src/plot/LegendStyle.php by phpcodesniffer

There are no issues that match your filters.

Category
Status