HuasoFoundries/jpgraph

View on GitHub
src/graph/RectPattern3DPlane.php

Summary

Maintainability
A
2 hrs
Test Coverage

Method DoPattern has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function DoPattern($aImg)
    {
        // "Fake" a nice 3D grid-effect.
        $x0       = $this->rect->x + $this->rect->w / 2;
        $y0       = $this->rect->y;
Severity: Minor
Found in src/graph/RectPattern3DPlane.php - About 2 hrs to fix

    The method DoPattern() has 100 lines of code. Current threshold is set to 100. Avoid really long methods.
    Open

        public function DoPattern($aImg)
        {
            // "Fake" a nice 3D grid-effect.
            $x0       = $this->rect->x + $this->rect->w / 2;
            $y0       = $this->rect->y;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.php by phpmd

    Avoid variables with short names like $ds. Configured minimum length is 3.
    Open

            $ds = $hls * ($apa - $vls) / $apa;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $c. Configured minimum length is 3.
    Open

            $c = $apa - $d * $apa / $dist;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $d. Configured minimum length is 3.
    Open

            $d = $this->rect->w / 2;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $x1. Configured minimum length is 3.
    Open

            $x1       = $x0;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $y. Configured minimum length is 3.
    Open

            $y  = $this->rect->ye;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $x0. Configured minimum length is 3.
    Open

            $x0       = $this->rect->x + $this->rect->w / 2;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $y0. Configured minimum length is 3.
    Open

            $y0       = $this->rect->y;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $k. Configured minimum length is 3.
    Open

            $k    = ($this->rect->ye - ($this->rect->ye - $vls)) / ($middle - ($middle - $ds));
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 $y1. Configured minimum length is 3.
    Open

            $y1       = $this->rect->ye;
    Severity: Minor
    Found in src/graph/RectPattern3DPlane.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 "RectPattern3DPlane::DoPattern" is not in camel caps format
    Open

        public function DoPattern($aImg)

    Method name "RectPattern3DPlane::SetHorizon" is not in camel caps format
    Open

        public function SetHorizon($aHorizon)

    There are no issues that match your filters.

    Category
    Status