HuasoFoundries/jpgraph

View on GitHub
src/plot/GanttPlotObject.php

Summary

Maintainability
A
35 mins
Test Coverage

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

    public function SetConstrain($aRow, $aType, $aColor = 'black', $aArrowSize = ARROW_S2, $aArrowType = ARROWT_SOLID)
Severity: Minor
Found in src/plot/GanttPlotObject.php - About 35 mins to fix

    Avoid unused parameters such as '$aImg'.
    Open

        public function GetAbsHeight($aImg)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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);
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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);
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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);
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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);
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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);
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpmd

    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)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::SetCSIMTarget" is not in camel caps format
    Open

        public function SetCSIMTarget($aTarget, $aAlt = '', $aWinTarget = '')
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::SetCSIMAlt" is not in camel caps format
    Open

        public function SetCSIMAlt($aAlt)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::GetMinDate" is not in camel caps format
    Open

        public function GetMinDate()
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::GetMaxDate" is not in camel caps format
    Open

        public function GetMaxDate()
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::GetCSIMArea" is not in camel caps format
    Open

        public function GetCSIMArea()
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::SetLabelLeftMargin" is not in camel caps format
    Open

        public function SetLabelLeftMargin($aOff)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::StrokeActInfo" is not in camel caps format
    Open

        public function StrokeActInfo($aImg, $aScale, $aYPos)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::SetConstrainPos" is not in camel caps format
    Open

        public function SetConstrainPos($xt, $yt, $xb, $yb)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::SetConstrain" is not in camel caps format
    Open

        public function SetConstrain($aRow, $aType, $aColor = 'black', $aArrowSize = ARROW_S2, $aArrowType = ARROWT_SOLID)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::SetCaptionMargin" is not in camel caps format
    Open

        public function SetCaptionMargin($aMarg)
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    Method name "GanttPlotObject::GetLineNbr" is not in camel caps format
    Open

        public function GetLineNbr()
    Severity: Minor
    Found in src/plot/GanttPlotObject.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status