HuasoFoundries/jpgraph

View on GitHub
src/graph/LineProperty.php

Summary

Maintainability
A
35 mins
Test Coverage

Method Stroke has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function Stroke($aImg, $aX1, $aY1, $aX2, $aY2)
Severity: Minor
Found in src/graph/LineProperty.php - About 35 mins to fix

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

        public function Show($aShow = true)
    Severity: Minor
    Found in src/graph/LineProperty.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 "LineProperty::SetWeight" is not in camel caps format
    Open

        public function SetWeight($aWeight)
    Severity: Minor
    Found in src/graph/LineProperty.php by phpcodesniffer

    Method name "LineProperty::SetColor" is not in camel caps format
    Open

        public function SetColor($aColor)
    Severity: Minor
    Found in src/graph/LineProperty.php by phpcodesniffer

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

        public function Show($aShow = true)
    Severity: Minor
    Found in src/graph/LineProperty.php by phpcodesniffer

    Method name "LineProperty::Stroke" is not in camel caps format
    Open

        public function Stroke($aImg, $aX1, $aY1, $aX2, $aY2)
    Severity: Minor
    Found in src/graph/LineProperty.php by phpcodesniffer

    Method name "LineProperty::SetStyle" is not in camel caps format
    Open

        public function SetStyle($aStyle)
    Severity: Minor
    Found in src/graph/LineProperty.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status