HuasoFoundries/jpgraph

View on GitHub
src/graph/CanvasScale.php

Summary

Maintainability
A
35 mins
Test Coverage

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

    public function __construct($graph, $xmin = 0, $xmax = 10, $ymin = 0, $ymax = 10)
Severity: Minor
Found in src/graph/CanvasScale.php - About 35 mins to fix

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

        private $g;
    Severity: Minor
    Found in src/graph/CanvasScale.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 $h. Configured minimum length is 3.
    Open

        private $h;
    Severity: Minor
    Found in src/graph/CanvasScale.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

        public function TranslateY($y)
    Severity: Minor
    Found in src/graph/CanvasScale.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 $xp. Configured minimum length is 3.
    Open

            $xp = round(($x - $this->ixmin) / ($this->ixmax - $this->ixmin) * $this->w);
    Severity: Minor
    Found in src/graph/CanvasScale.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 $w. Configured minimum length is 3.
    Open

        private $w;
    Severity: Minor
    Found in src/graph/CanvasScale.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 $x. Configured minimum length is 3.
    Open

        public function TranslateX($x)
    Severity: Minor
    Found in src/graph/CanvasScale.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 $xp. Configured minimum length is 3.
    Open

            $xp = round(($x - $this->ixmin) / ($this->ixmax - $this->ixmin) * $this->w);
    Severity: Minor
    Found in src/graph/CanvasScale.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 $x. Configured minimum length is 3.
    Open

        public function Translate($x, $y)
    Severity: Minor
    Found in src/graph/CanvasScale.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 $yp. Configured minimum length is 3.
    Open

            $yp = round(($y - $this->iymin) / ($this->iymax - $this->iymin) * $this->h);
    Severity: Minor
    Found in src/graph/CanvasScale.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 $yp. Configured minimum length is 3.
    Open

            $yp = round(($y - $this->iymin) / ($this->iymax - $this->iymin) * $this->h);
    Severity: Minor
    Found in src/graph/CanvasScale.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

        public function Translate($x, $y)
    Severity: Minor
    Found in src/graph/CanvasScale.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 "CanvasScale::Set" is not in camel caps format
    Open

        public function Set($xmin = 0, $xmax = 10, $ymin = 0, $ymax = 10)
    Severity: Minor
    Found in src/graph/CanvasScale.php by phpcodesniffer

    Method name "CanvasScale::Translate" is not in camel caps format
    Open

        public function Translate($x, $y)
    Severity: Minor
    Found in src/graph/CanvasScale.php by phpcodesniffer

    Method name "CanvasScale::TranslateY" is not in camel caps format
    Open

        public function TranslateY($y)
    Severity: Minor
    Found in src/graph/CanvasScale.php by phpcodesniffer

    Method name "CanvasScale::Get" is not in camel caps format
    Open

        public function Get()
    Severity: Minor
    Found in src/graph/CanvasScale.php by phpcodesniffer

    Method name "CanvasScale::TranslateX" is not in camel caps format
    Open

        public function TranslateX($x)
    Severity: Minor
    Found in src/graph/CanvasScale.php by phpcodesniffer

    There are no issues that match your filters.

    Category
    Status