HuasoFoundries/jpgraph

View on GitHub
src/graph/RadarGraph.php

Summary

Maintainability
D
1 day
Test Coverage

Function Stroke has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
Open

    public function Stroke($aStrokeFileName = '')
    {
        // If the filename is the predefined value = '_csim_special_'
        // we assume that the call to stroke only needs to do enough
        // to correctly generate the CSIM maps.
Severity: Minor
Found in src/graph/RadarGraph.php - About 6 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method Stroke has 97 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function Stroke($aStrokeFileName = '')
    {
        // If the filename is the predefined value = '_csim_special_'
        // we assume that the call to stroke only needs to do enough
        // to correctly generate the CSIM maps.
Severity: Major
Found in src/graph/RadarGraph.php - About 3 hrs to fix

    The class RadarGraph has an overall complexity of 69 which is very high. The configured complexity threshold is 50.
    Open

    class RadarGraph extends Graph
    {
        public $grid;
        public $axis;
        private $posx;
    Severity: Minor
    Found in src/graph/RadarGraph.php by phpmd

    File RadarGraph.php has 255 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /**
     * JPGraph v4.0.3
     */
    Severity: Minor
    Found in src/graph/RadarGraph.php - About 2 hrs to fix

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

          public function __construct($width = 300, $height = 200, $cachedName = '', $timeout = 0, $inline = 1)
      Severity: Minor
      Found in src/graph/RadarGraph.php - About 35 mins to fix

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

            public function SetScale($axtype, $ymin = 1, $ymax = 1, $dummy1 = null, $dumy2 = null)
        Severity: Minor
        Found in src/graph/RadarGraph.php - About 35 mins to fix

          Function Add has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function Add($aPlot)
              {
                  if ($aPlot == null) {
                      Util\JpGraphError::RaiseL(25010); //("Graph::Add() You tried to add a null plot to the graph.");
                  }
          Severity: Minor
          Found in src/graph/RadarGraph.php - About 35 mins to fix

          Cognitive Complexity

          Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

          A method's cognitive complexity is based on a few simple rules:

          • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
          • Code is considered more complex for each "break in the linear flow of the code"
          • Code is considered more complex when "flow breaking structures are nested"

          Further reading

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

              public function Stroke($aStrokeFileName = '')
              {
                  // If the filename is the predefined value = '_csim_special_'
                  // we assume that the call to stroke only needs to do enough
                  // to correctly generate the CSIM maps.
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          The method Stroke() has an NPath complexity of 952560. The configured NPath complexity threshold is 200.
          Open

              public function Stroke($aStrokeFileName = '')
              {
                  // If the filename is the predefined value = '_csim_special_'
                  // we assume that the call to stroke only needs to do enough
                  // to correctly generate the CSIM maps.
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          NPathComplexity

          Since: 0.1

          The NPath complexity of a method is the number of acyclic execution paths through that method. A threshold of 200 is generally considered the point where measures should be taken to reduce complexity.

          Example

          class Foo {
              function bar() {
                  // lots of complicated code
              }
          }

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

          The method Stroke() has a Cyclomatic Complexity of 29. The configured cyclomatic complexity threshold is 10.
          Open

              public function Stroke($aStrokeFileName = '')
              {
                  // If the filename is the predefined value = '_csim_special_'
                  // we assume that the call to stroke only needs to do enough
                  // to correctly generate the CSIM maps.
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          CyclomaticComplexity

          Since: 0.1

          Complexity is determined by the number of decision points in a method plus one for the method entry. The decision points are 'if', 'while', 'for', and 'case labels'. Generally, 1-4 is low complexity, 5-7 indicates moderate complexity, 8-10 is high complexity, and 11+ is very high complexity.

          Example

          // Cyclomatic Complexity = 11
          class Foo {
          1   public function example() {
          2       if ($a == $b) {
          3           if ($a1 == $b1) {
                          fiddle();
          4           } elseif ($a2 == $b2) {
                          fiddle();
                      } else {
                          fiddle();
                      }
          5       } elseif ($c == $d) {
          6           while ($c == $d) {
                          fiddle();
                      }
          7        } elseif ($e == $f) {
          8           for ($n = 0; $n < $h; $n++) {
                          fiddle();
                      }
                  } else {
                      switch ($z) {
          9               case 1:
                              fiddle();
                              break;
          10              case 2:
                              fiddle();
                              break;
          11              case 3:
                              fiddle();
                              break;
                          default:
                              fiddle();
                              break;
                      }
                  }
              }
          }

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

          Avoid using undefined variables such as '$grid' which will lead to PHP notices.
          Open

                              $this->axis->Stroke($this->posy, $a, $grid[$i], $this->axis_title[$i], $i == 0);
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$grid' which will lead to PHP notices.
          Open

                              $this->axis->Stroke($this->posy, $a, $grid[$i], $this->axis_title[$i], $i == 0);
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$grid' which will lead to PHP notices.
          Open

                          $this->grid->Stroke($this->img, $grid);
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

          Avoid using undefined variables such as '$grid' which will lead to PHP notices.
          Open

                          $this->grid->Stroke($this->img, $grid);
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          UndefinedVariable

          Since: 2.8.0

          Detects when a variable is used that has not been defined before.

          Example

          class Foo
          {
              private function bar()
              {
                  // $message is undefined
                  echo $message;
              }
          }

          Source https://phpmd.org/rules/cleancode.html#undefinedvariable

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

              public function HideTickMarks($aFlag = true)
          Severity: Minor
          Found in src/graph/RadarGraph.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 ShowMinorTickmarks has a boolean flag argument $aFlag, which is a certain sign of a Single Responsibility Principle violation.
          Open

              public function ShowMinorTickmarks($aFlag = true)
          Severity: Minor
          Found in src/graph/RadarGraph.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 Add uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      $cl = $aPlot;
                  }
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class '\Amenadiel\JpGraph\Util\JpGraphError' in method 'GetPlotsYMinMax'.
          Open

                      Util\JpGraphError::RaiseL(18006, $min);
          Severity: Minor
          Found in src/graph/RadarGraph.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 'Add'.
          Open

                      Util\JpGraphError::RaiseL(25010); //("Graph::Add() You tried to add a null plot to the graph.");
          Severity: Minor
          Found in src/graph/RadarGraph.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 'SetTickDensity'.
          Open

                          Util\JpGraphError::RaiseL(18005, $densy);
          Severity: Minor
          Found in src/graph/RadarGraph.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 'Stroke'.
          Open

                          Util\JpGraphError::RaiseL(18008);
          Severity: Minor
          Found in src/graph/RadarGraph.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

          The method SetCenter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      $this->posx = $px;
                  }
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          The method Add uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      $this->plots[] = $aPlot;
                  }
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid using static access to class '\Amenadiel\JpGraph\Util\JpGraphError' in method 'SetScale'.
          Open

                      Util\JpGraphError::RaiseL(18003, $axtype);
          Severity: Minor
          Found in src/graph/RadarGraph.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 'Stroke'.
          Open

                      Util\JpGraphError::RaiseL(18007);
          Severity: Minor
          Found in src/graph/RadarGraph.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 'SetSize'.
          Open

                      Util\JpGraphError::RaiseL(18004, $aSize);
          Severity: Minor
          Found in src/graph/RadarGraph.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

          The method Stroke uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                      } else {
                          $this->StrokeFrame();
                          $this->StrokeBackgroundGrad();
                      }
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          The method SetCenter uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
          Open

                  } else {
                      $this->posy = $py;
                  }
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpmd

          ElseExpression

          Since: 1.4.0

          An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

          Example

          class Foo
          {
              public function bar($flag)
              {
                  if ($flag) {
                      // one branch
                  } else {
                      // another branch
                  }
              }
          }

          Source https://phpmd.org/rules/cleancode.html#elseexpression

          Avoid unused parameters such as '$dumy2'.
          Open

              public function SetScale($axtype, $ymin = 1, $ymax = 1, $dummy1 = null, $dumy2 = null)
          Severity: Minor
          Found in src/graph/RadarGraph.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 unused parameters such as '$dummy1'.
          Open

              public function SetScale($axtype, $ymin = 1, $ymax = 1, $dummy1 = null, $dumy2 = null)
          Severity: Minor
          Found in src/graph/RadarGraph.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 unused parameters such as '$dummy1'.
          Open

              public function SetTickDensity($densy = TICKD_NORMAL, $dummy1 = null)
          Severity: Minor
          Found in src/graph/RadarGraph.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

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                      if ($this->grid_depth == DEPTH_BACK) {
                          // Draw axis and grid
                          for ($i = 0, $a = M_PI / 2; $i < $nbrpnts; ++$i, $a += $astep) {
                              $this->axis->Stroke($this->posy, $a, $grid[$i], $this->axis_title[$i], $i == 0);
                          }
          Severity: Minor
          Found in src/graph/RadarGraph.php and 1 other location - About 30 mins to fix
          src/graph/RadarGraph.php on lines 300..306

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 91.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 2 locations. Consider refactoring.
          Open

                      if ($this->grid_depth != DEPTH_BACK) {
                          // Draw axis and grid
                          for ($i = 0, $a = M_PI / 2; $i < $nbrpnts; ++$i, $a += $astep) {
                              $this->axis->Stroke($this->posy, $a, $grid[$i], $this->axis_title[$i], $i == 0);
                          }
          Severity: Minor
          Found in src/graph/RadarGraph.php and 1 other location - About 30 mins to fix
          src/graph/RadarGraph.php on lines 281..287

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 91.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

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

              public function SetCenter($px, $py = 0.5)
          Severity: Minor
          Found in src/graph/RadarGraph.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 $n. Configured minimum length is 3.
          Open

                      $n = safe_count($this->texts);
          Severity: Minor
          Found in src/graph/RadarGraph.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 $n. Configured minimum length is 3.
          Open

                      $n = safe_count($this->iIcons);
          Severity: Minor
          Found in src/graph/RadarGraph.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 $n. Configured minimum length is 3.
          Open

                  $n = safe_count($this->plots);
          Severity: Minor
          Found in src/graph/RadarGraph.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 $px. Configured minimum length is 3.
          Open

              public function SetPos($px, $py = 0.5)
          Severity: Minor
          Found in src/graph/RadarGraph.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 $py. Configured minimum length is 3.
          Open

              public function SetPos($px, $py = 0.5)
          Severity: Minor
          Found in src/graph/RadarGraph.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 $py. Configured minimum length is 3.
          Open

              public function SetCenter($px, $py = 0.5)
          Severity: Minor
          Found in src/graph/RadarGraph.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 $cl. Configured minimum length is 3.
          Open

                      $cl = $aPlot[0];
          Severity: Minor
          Found in src/graph/RadarGraph.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 "RadarGraph::StrokeIcons" is not in camel caps format
          Open

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

          Method name "RadarGraph::SetPos" is not in camel caps format
          Open

              public function SetPos($px, $py = 0.5)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::SetTitles" is not in camel caps format
          Open

              public function SetTitles($aTitleArray)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

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

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

          Method name "RadarGraph::HideTickMarks" is not in camel caps format
          Open

              public function HideTickMarks($aFlag = true)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::SetScale" is not in camel caps format
          Open

              public function SetScale($axtype, $ymin = 1, $ymax = 1, $dummy1 = null, $dumy2 = null)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::SetPlotSize" is not in camel caps format
          Open

              public function SetPlotSize($aSize)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::ShowMinorTickmarks" is not in camel caps format
          Open

              public function ShowMinorTickmarks($aFlag = true)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

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

              public function Stroke($aStrokeFileName = '')
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::GetPlotsYMinMax" is not in camel caps format
          Open

              public function GetPlotsYMinMax($aPlots)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::SetCenter" is not in camel caps format
          Open

              public function SetCenter($px, $py = 0.5)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::SetSize" is not in camel caps format
          Open

              public function SetSize($aSize)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::StrokeTexts" is not in camel caps format
          Open

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

          Method name "RadarGraph::Add" is not in camel caps format
          Open

              public function Add($aPlot)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          Method name "RadarGraph::SetTickDensity" is not in camel caps format
          Open

              public function SetTickDensity($densy = TICKD_NORMAL, $dummy1 = null)
          Severity: Minor
          Found in src/graph/RadarGraph.php by phpcodesniffer

          There are no issues that match your filters.

          Category
          Status