HuasoFoundries/jpgraph

View on GitHub
src/graph/GanttScale.php

Summary

Maintainability
F
1 wk
Test Coverage

File GanttScale.php has 895 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

/**
 * JPGraph v4.0.3
 */
Severity: Major
Found in src/graph/GanttScale.php - About 2 days to fix

    Function StrokeMinutes has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
    Open

        public function StrokeMinutes($aYCoord, $getHeight = false)
        {
            $img = $this->iImg;
            $xt  = $img->left_margin + $this->iLabelWidth;
            $yt  = $aYCoord + $img->top_margin;
    Severity: Minor
    Found in src/graph/GanttScale.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

    GanttScale has 46 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class GanttScale
    {
        public $minute;
        public $hour;
        public $day;
    Severity: Minor
    Found in src/graph/GanttScale.php - About 6 hrs to fix

      Function StrokeDays has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

          public function StrokeDays($aYCoord, $getHeight = false)
          {
              $img      = $this->iImg;
              $daywidth = $this->GetDayWidth();
              $xt       = $img->left_margin + $this->iLabelWidth;
      Severity: Minor
      Found in src/graph/GanttScale.php - About 5 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

      Function StrokeHours has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
      Open

          public function StrokeHours($aYCoord, $getHeight = false)
          {
              $img = $this->iImg;
              $xt  = $img->left_margin + $this->iLabelWidth;
              $yt  = $aYCoord + $img->top_margin;
      Severity: Minor
      Found in src/graph/GanttScale.php - About 4 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 StrokeDays has 107 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function StrokeDays($aYCoord, $getHeight = false)
          {
              $img      = $this->iImg;
              $daywidth = $this->GetDayWidth();
              $xt       = $img->left_margin + $this->iLabelWidth;
      Severity: Major
      Found in src/graph/GanttScale.php - About 4 hrs to fix

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

        class GanttScale
        {
            public $minute;
            public $hour;
            public $day;
        Severity: Minor
        Found in src/graph/GanttScale.php by phpmd

        The class GanttScale has 16 public methods. Consider refactoring GanttScale to keep number of public methods under 10.
        Open

        class GanttScale
        {
            public $minute;
            public $hour;
            public $day;
        Severity: Minor
        Found in src/graph/GanttScale.php by phpmd

        TooManyPublicMethods

        Since: 0.1

        A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

        By default it ignores methods starting with 'get' or 'set'.

        Example

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

        Method StrokeHours has 80 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function StrokeHours($aYCoord, $getHeight = false)
            {
                $img = $this->iImg;
                $xt  = $img->left_margin + $this->iLabelWidth;
                $yt  = $aYCoord + $img->top_margin;
        Severity: Major
        Found in src/graph/GanttScale.php - About 3 hrs to fix

          Function StrokeMonths has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
          Open

              public function StrokeMonths($aYCoord, $getHeight = false)
              {
                  if ($this->month->iShowLabels) {
                      $img = $this->iImg;
                      $img->SetFont($this->month->iFFamily, $this->month->iFStyle, $this->month->iFSize);
          Severity: Minor
          Found in src/graph/GanttScale.php - About 2 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 StrokeMinutes has 71 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function StrokeMinutes($aYCoord, $getHeight = false)
              {
                  $img = $this->iImg;
                  $xt  = $img->left_margin + $this->iLabelWidth;
                  $yt  = $aYCoord + $img->top_margin;
          Severity: Major
          Found in src/graph/GanttScale.php - About 2 hrs to fix

            Method StrokeWeeks has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function StrokeWeeks($aYCoord, $getHeight = false)
                {
                    if ($this->week->iShowLabels) {
                        $img = $this->iImg;
                        $yt  = $aYCoord + $img->top_margin;
            Severity: Major
            Found in src/graph/GanttScale.php - About 2 hrs to fix

              Method StrokeMonths has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function StrokeMonths($aYCoord, $getHeight = false)
                  {
                      if ($this->month->iShowLabels) {
                          $img = $this->iImg;
                          $img->SetFont($this->month->iFFamily, $this->month->iFStyle, $this->month->iFSize);
              Severity: Major
              Found in src/graph/GanttScale.php - About 2 hrs to fix

                Function StrokeWeeks has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function StrokeWeeks($aYCoord, $getHeight = false)
                    {
                        if ($this->week->iShowLabels) {
                            $img = $this->iImg;
                            $yt  = $aYCoord + $img->top_margin;
                Severity: Minor
                Found in src/graph/GanttScale.php - About 2 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

                Function StrokeYears has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function StrokeYears($aYCoord, $getHeight = false)
                    {
                        if ($this->year->iShowLabels) {
                            $img = $this->iImg;
                            $yt  = $aYCoord + $img->top_margin;
                Severity: Minor
                Found in src/graph/GanttScale.php - About 2 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 StrokeYears has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function StrokeYears($aYCoord, $getHeight = false)
                    {
                        if ($this->year->iShowLabels) {
                            $img = $this->iImg;
                            $yt  = $aYCoord + $img->top_margin;
                Severity: Major
                Found in src/graph/GanttScale.php - About 2 hrs to fix

                  The class GanttScale has 27 fields. Consider redesigning GanttScale to keep the number of fields under 15.
                  Open

                  class GanttScale
                  {
                      public $minute;
                      public $hour;
                      public $day;
                  Severity: Minor
                  Found in src/graph/GanttScale.php by phpmd

                  TooManyFields

                  Since: 0.1

                  Classes that have too many fields could be redesigned to have fewer fields, possibly through some nested object grouping of some of the information. For example, a class with city/state/zip fields could instead have one Address field.

                  Example

                  class Person {
                     protected $one;
                     private $two;
                     private $three;
                     [... many more fields ...]
                  }

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

                  Method StrokeTableHeaders has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function StrokeTableHeaders($aYBottom)
                      {
                          $img = $this->iImg;
                          $xt  = $img->left_margin;
                          $yt  = $img->top_margin;
                  Severity: Minor
                  Found in src/graph/GanttScale.php - About 1 hr to fix

                    Method __construct has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function __construct($aImg)
                        {
                            $this->iImg        = $aImg;
                            $this->iDateLocale = new Util\DateLocale();
                    
                    
                    Severity: Minor
                    Found in src/graph/GanttScale.php - About 1 hr to fix

                      The class GanttScale has 62 public methods and attributes. Consider reducing the number of public items to less than 45.
                      Open

                      class GanttScale
                      {
                          public $minute;
                          public $hour;
                          public $day;
                      Severity: Minor
                      Found in src/graph/GanttScale.php by phpmd

                      ExcessivePublicCount

                      Since: 0.1

                      A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

                      Example

                      public class Foo {
                          public $value;
                          public $something;
                          public $var;
                          // [... more more public attributes ...]
                      
                          public function doWork() {}
                          public function doMoreWork() {}
                          public function doWorkAgain() {}
                          // [... more more public methods ...]
                      }

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

                      Method GetHeaderHeight has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function GetHeaderHeight()
                          {
                              $img    = $this->iImg;
                              $height = 1;
                              if ($this->minute->iShowLabels) {
                      Severity: Minor
                      Found in src/graph/GanttScale.php - About 1 hr to fix

                        Method GetMonthLabel has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function GetMonthLabel($aMonthNbr, $year)
                            {
                                $sn = $this->iDateLocale->GetShortMonthName($aMonthNbr);
                                $ln = $this->iDateLocale->GetLongMonthName($aMonthNbr);
                                switch ($this->month->iStyle) {
                        Severity: Minor
                        Found in src/graph/GanttScale.php - About 1 hr to fix

                          Function GetMonthLabel has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function GetMonthLabel($aMonthNbr, $year)
                              {
                                  $sn = $this->iDateLocale->GetShortMonthName($aMonthNbr);
                                  $ln = $this->iDateLocale->GetLongMonthName($aMonthNbr);
                                  switch ($this->month->iStyle) {
                          Severity: Minor
                          Found in src/graph/GanttScale.php - About 45 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

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (!(($i == $n || $i == 0) && $this->hour->iShowLabels && $this->hour->grid->iShow)) {
                                                      $img->SetColor($this->minute->grid->iColor);
                                                      $img->SetLineWeight($this->minute->grid->iWeight);
                                                      $img->Line($x, $yt, $x, $yb);
                                                      $this->minute->grid->Stroke($img, $x, $yb, $x, $img->height - $img->bottom_margin);
                          Severity: Major
                          Found in src/graph/GanttScale.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                    switch ($this->minute->iStyle) {
                                                        case MINUTESTYLE_CUSTOM:
                                                            $txt = date($this->minute->iLabelFormStr, $datestamp);
                            
                                                            break;
                            Severity: Major
                            Found in src/graph/GanttScale.php - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                      if ($day == 6 || $day == 0) {
                                                          $img->PushColor($this->day->iWeekendBackgroundColor);
                                                          if ($this->iUsePlotWeekendBackground) {
                                                              $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $img->height - $img->bottom_margin);
                                                          } else {
                              Severity: Major
                              Found in src/graph/GanttScale.php - About 45 mins to fix

                                Function NormalizeDate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function NormalizeDate($aDate)
                                    {
                                        if ($aDate === false) {
                                            return false;
                                        }
                                Severity: Minor
                                Found in src/graph/GanttScale.php - About 25 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

                                Function GetHeaderHeight has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function GetHeaderHeight()
                                    {
                                        $img    = $this->iImg;
                                        $height = 1;
                                        if ($this->minute->iShowLabels) {
                                Severity: Minor
                                Found in src/graph/GanttScale.php - About 25 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 StrokeHours() has an NPath complexity of 249. The configured NPath complexity threshold is 200.
                                Open

                                    public function StrokeHours($aYCoord, $getHeight = false)
                                    {
                                        $img = $this->iImg;
                                        $xt  = $img->left_margin + $this->iLabelWidth;
                                        $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMinutes() has an NPath complexity of 985. The configured NPath complexity threshold is 200.
                                Open

                                    public function StrokeMinutes($aYCoord, $getHeight = false)
                                    {
                                        $img = $this->iImg;
                                        $xt  = $img->left_margin + $this->iLabelWidth;
                                        $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeDays() has 147 lines of code. Current threshold is set to 100. Avoid really long methods.
                                Open

                                    public function StrokeDays($aYCoord, $getHeight = false)
                                    {
                                        $img      = $this->iImg;
                                        $daywidth = $this->GetDayWidth();
                                        $xt       = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpmd

                                The class GanttScale has 1224 lines of code. Current threshold is 1000. Avoid really long classes.
                                Open

                                class GanttScale
                                {
                                    public $minute;
                                    public $hour;
                                    public $day;
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpmd

                                The method StrokeDays() has an NPath complexity of 563. The configured NPath complexity threshold is 200.
                                Open

                                    public function StrokeDays($aYCoord, $getHeight = false)
                                    {
                                        $img      = $this->iImg;
                                        $daywidth = $this->GetDayWidth();
                                        $xt       = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeWeeks() has an NPath complexity of 229. The configured NPath complexity threshold is 200.
                                Open

                                    public function StrokeWeeks($aYCoord, $getHeight = false)
                                    {
                                        if ($this->week->iShowLabels) {
                                            $img = $this->iImg;
                                            $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMinutes() has a Cyclomatic Complexity of 18. The configured cyclomatic complexity threshold is 10.
                                Open

                                    public function StrokeMinutes($aYCoord, $getHeight = false)
                                    {
                                        $img = $this->iImg;
                                        $xt  = $img->left_margin + $this->iLabelWidth;
                                        $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

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

                                    public function StrokeHours($aYCoord, $getHeight = false)
                                    {
                                        $img = $this->iImg;
                                        $xt  = $img->left_margin + $this->iLabelWidth;
                                        $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

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

                                    public function StrokeDays($aYCoord, $getHeight = false)
                                    {
                                        $img      = $this->iImg;
                                        $daywidth = $this->GetDayWidth();
                                        $xt       = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

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

                                    public function StrokeWeeks($aYCoord, $getHeight = false)
                                    {
                                        if ($this->week->iShowLabels) {
                                            $img = $this->iImg;
                                            $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

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

                                    public function StrokeMonths($aYCoord, $getHeight = false)
                                    {
                                        if ($this->month->iShowLabels) {
                                            $img = $this->iImg;
                                            $img->SetFont($this->month->iFFamily, $this->month->iFStyle, $this->month->iFSize);
                                Severity: Minor
                                Found in src/graph/GanttScale.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

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

                                    public function StrokeHours($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMinutes has a boolean flag argument $getHeight, which is a certain sign of a Single Responsibility Principle violation.
                                Open

                                    public function StrokeMinutes($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.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 TranslateVertPos has a boolean flag argument $atTop, which is a certain sign of a Single Responsibility Principle violation.
                                Open

                                    public function TranslateVertPos($aPos, $atTop = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMonths has a boolean flag argument $getHeight, which is a certain sign of a Single Responsibility Principle violation.
                                Open

                                    public function StrokeMonths($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeDays has a boolean flag argument $getHeight, which is a certain sign of a Single Responsibility Principle violation.
                                Open

                                    public function StrokeDays($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.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 GetWeekNbr has a boolean flag argument $aSunStart, which is a certain sign of a Single Responsibility Principle violation.
                                Open

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

                                    public function StrokeYears($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeWeeks has a boolean flag argument $getHeight, which is a certain sign of a Single Responsibility Principle violation.
                                Open

                                    public function StrokeWeeks($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.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 TranslateDate uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                            } else {
                                                $offset = -3600;
                                            }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 TimeToMinutes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                        } else {
                                            $hourint = floor(substr($aTimeString, 0, $pos));
                                            $minint  = floor(substr($aTimeString, $pos + 1));
                                        }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'NormalizeDate'.
                                Open

                                                Util\JpGraphError::RaiseL(6016, $aDate);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 AdjustStartEndDay uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                        } else {
                                            $d = $this->iStartDate;
                                        }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'TranslateVertPos'.
                                Open

                                            Util\JpGraphError::RaiseL(6015, $aPos);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'StrokeMinutes'.
                                Open

                                                Util\JpGraphError::RaiseL(6018, $minint);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'StrokeMinutes'.
                                Open

                                                Util\JpGraphError::RaiseL(6019, $width);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'NormalizeDate'.
                                Open

                                        Util\JpGraphError::RaiseL(6017, $aDate);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMinutes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                        } else {
                                                            $img->SetColor($this->day->iTextColor);
                                                        }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeHours uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                    } else {
                                                        $img->SetColor($this->day->iTextColor);
                                                    }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeDays uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                } else {
                                                    $img->SetColor($this->day->iTextColor);
                                                }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'Stroke'.
                                Open

                                            Util\JpGraphError::RaiseL(6023);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 TranslateVertPos uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                        } else {
                                            // position the top bar at 1/2 a vert spacing from the scale
                                            $pos = round($img->top_margin + $this->iVertHeaderSize + $this->iTopPlotMargin + ($aPos + 1) * $this->iVertSpacing);
                                        }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMonths uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                            } else {
                                                $monthwidth = $this->GetDayWidth() * ($this->GetNumDaysInMonth($monthnbr, $year) - $this->GetMonthDayNbr($this->iStartDate) + 1);
                                            }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeYears uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                            } else {
                                                $yearwidth = $this->GetDayWidth() * ($this->GetNumDaysInYear($year) - $this->GetYearDayNbr($this->iStartDate) + 1);
                                            }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeWeeks uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                            } else {
                                                Util\JpGraphError::RaiseL(6021);
                                                //("Unknown formatting style for week.");
                                            }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMinutes uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                            } else {
                                                                $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $yb - $this->day->iFrameWeight);
                                                            }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeHours uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                        } else {
                                                            $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $yb - $this->day->iFrameWeight);
                                                        }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeDays uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                    } else {
                                                        $img->FilledRectangle(
                                                            $x,
                                                            $yt + $this->day->iFrameWeight,
                                                            $x + $daywidth,
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'StrokeWeeks'.
                                Open

                                                Util\JpGraphError::RaiseL(6021);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeYears uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                } else {
                                                    $w = $xb - $x;
                                                }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 'Stroke'.
                                Open

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

                                                Util\JpGraphError::RaiseL(6020, $tmp);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 StrokeMonths uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
                                Open

                                                } else {
                                                    $w = $xb - $x;
                                                }
                                Severity: Minor
                                Found in src/graph/GanttScale.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 local variables such as '$wdays'.
                                Open

                                            $wdays     = $this->iDateLocale->GetDayAbb();
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpmd

                                UnusedLocalVariable

                                Since: 0.2

                                Detects when a local variable is declared and/or assigned, but not used.

                                Example

                                class Foo {
                                    public function doSomething()
                                    {
                                        $i = 5; // Unused
                                    }
                                }

                                Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

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

                                                        if ($this->iUsePlotWeekendBackground && $doback) {
                                                            $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $img->height - $img->bottom_margin);
                                                        } else {
                                                            $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $yb - $this->day->iFrameWeight);
                                                        }
                                Severity: Minor
                                Found in src/graph/GanttScale.php and 1 other location - About 30 mins to fix
                                src/graph/GanttScale.php on lines 760..774

                                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 90.

                                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

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

                                                    if ($this->iUsePlotWeekendBackground && $doback) {
                                                        $img->FilledRectangle(
                                                            $x,
                                                            $yt + $this->day->iFrameWeight,
                                                            $x + $daywidth,
                                Severity: Minor
                                Found in src/graph/GanttScale.php and 1 other location - About 30 mins to fix
                                src/graph/GanttScale.php on lines 665..669

                                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 90.

                                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 excessively long variable names like $iTableHeaderBackgroundColor. Keep variable name length under 20.
                                Open

                                    private $iTableHeaderBackgroundColor = 'white';
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpmd

                                LongVariable

                                Since: 0.2

                                Detects when a field, formal or local variable is declared with a long name.

                                Example

                                class Something {
                                    protected $reallyLongIntName = -3; // VIOLATION - Field
                                    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                        $otherReallyLongName = -5; // VIOLATION - Local
                                        for ($interestingIntIndex = 0; // VIOLATION - For
                                             $interestingIntIndex < 10;
                                             $interestingIntIndex++ ) {
                                        }
                                    }
                                }

                                Source https://phpmd.org/rules/naming.html#longvariable

                                Avoid excessively long variable names like $iTableHeaderFrameColor. Keep variable name length under 20.
                                Open

                                    private $iTableHeaderFrameColor      = 'black';
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpmd

                                LongVariable

                                Since: 0.2

                                Detects when a field, formal or local variable is declared with a long name.

                                Example

                                class Something {
                                    protected $reallyLongIntName = -3; // VIOLATION - Field
                                    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                        $otherReallyLongName = -5; // VIOLATION - Local
                                        for ($interestingIntIndex = 0; // VIOLATION - For
                                             $interestingIntIndex < 10;
                                             $interestingIntIndex++ ) {
                                        }
                                    }
                                }

                                Source https://phpmd.org/rules/naming.html#longvariable

                                Avoid excessively long variable names like $iUsePlotWeekendBackground. Keep variable name length under 20.
                                Open

                                    private $iUsePlotWeekendBackground = true;
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpmd

                                LongVariable

                                Since: 0.2

                                Detects when a field, formal or local variable is declared with a long name.

                                Example

                                class Something {
                                    protected $reallyLongIntName = -3; // VIOLATION - Field
                                    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                        $otherReallyLongName = -5; // VIOLATION - Local
                                        for ($interestingIntIndex = 0; // VIOLATION - For
                                             $interestingIntIndex < 10;
                                             $interestingIntIndex++ ) {
                                        }
                                    }
                                }

                                Source https://phpmd.org/rules/naming.html#longvariable

                                Avoid excessively long variable names like $iTableHeaderFrameWeight. Keep variable name length under 20.
                                Open

                                    private $iTableHeaderFrameWeight     = 1;
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpmd

                                LongVariable

                                Since: 0.2

                                Detects when a field, formal or local variable is declared with a long name.

                                Example

                                class Something {
                                    protected $reallyLongIntName = -3; // VIOLATION - Field
                                    public static function main( array $interestingArgumentsList[] ) { // VIOLATION - Formal
                                        $otherReallyLongName = -5; // VIOLATION - Local
                                        for ($interestingIntIndex = 0; // VIOLATION - For
                                             $interestingIntIndex < 10;
                                             $interestingIntIndex++ ) {
                                        }
                                    }
                                }

                                Source https://phpmd.org/rules/naming.html#longvariable

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

                                            $x = $xt;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $t. Configured minimum length is 3.
                                Open

                                            $t = strtotime($aDate);
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $xb = $img->width - $img->right_margin + 1;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $nd. Configured minimum length is 3.
                                Open

                                            $nd = $this->GetNumberOfDays();
                                Severity: Minor
                                Found in src/graph/GanttScale.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         = 60 / $minint;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $x = $xt;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $de. Configured minimum length is 3.
                                Open

                                        $de = strftime('%w', $this->iEndDate);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $xt. Configured minimum length is 3.
                                Open

                                        $xt  = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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         = ceil(24 * 60 / $minint);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $xt. Configured minimum length is 3.
                                Open

                                        $xt  = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $x = $xt;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yb = $yt + $img->GetFontHeight() + $this->day->iTitleVertMargin + $this->day->iFrameWeight;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $xb       = $img->width - $img->right_margin + 1;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                                    $w = $monthwidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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                      = $img->height - $img->bottom_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $ds. Configured minimum length is 3.
                                Open

                                        $ds = strftime('%w', $this->iStartDate);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $xt. Configured minimum length is 3.
                                Open

                                            $xt   = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yb = $yt + $img->GetFontHeight() + $this->week->iTitleVertMargin + $this->week->iFrameWeight;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $x = $xt;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $m. Configured minimum length is 3.
                                Open

                                                $m = $sn;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                                    $w = $yearwidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $xb        = $img->width - $img->right_margin + 1;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                        $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yb = $yt + $img->GetFontHeight() +
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $xb = $img->width - $img->right_margin + 1;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $mn. Configured minimum length is 3.
                                Open

                                                $mn = strftime('%m', $datestamp);
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yb = $yt + $img->GetFontHeight() + $this->year->iTitleVertMargin + $this->year->iFrameWeight;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 = strtotime('-7 day', $this->iStartDate);
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                        $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yt = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yb = $yt + $img->GetFontHeight() + $this->month->iTitleVertMargin + $this->month->iFrameWeight;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $nh. Configured minimum length is 3.
                                Open

                                            $nh = ceil(24 * 60 / $this->TimeToMinutes($this->hour->GetIntervall()));
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $xb = $img->width - $img->right_margin + 1;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $sn. Configured minimum length is 3.
                                Open

                                        $sn = $this->iDateLocale->GetShortMonthName($aMonthNbr);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $ln. Configured minimum length is 3.
                                Open

                                        $ln = $this->iDateLocale->GetLongMonthName($aMonthNbr);
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yb = $yt + $img->GetFontHeight() +
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $xt. Configured minimum length is 3.
                                Open

                                        $xt       = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                        $xb  = $xt + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $xt. Configured minimum length is 3.
                                Open

                                            $xt       = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $xb   = $img->width - $img->right_margin + 1;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $yt  = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $x = $xt + $monthwidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                            $x = $xt + $yearwidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                        $yt  = $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                        $yt       = $aYCoord + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $xt. Configured minimum length is 3.
                                Open

                                            $xt        = $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.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 $xt. Configured minimum length is 3.
                                Open

                                        $xt  = $img->left_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                        $yb  = $aYBottom + $img->top_margin;
                                Severity: Minor
                                Found in src/graph/GanttScale.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

                                                    $w = sprintf($this->week->iLabelFormStr, $weeknbr);
                                Severity: Minor
                                Found in src/graph/GanttScale.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 "GanttScale::IsDisplayMinute" is not in camel caps format
                                Open

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

                                Method name "GanttScale::IsDisplayDay" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetMonthNbr" is not in camel caps format
                                Open

                                    public function GetMonthNbr($aDate)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::GetPlotWidth" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetHourWidth" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetNumDaysInMonth" is not in camel caps format
                                Open

                                    public function GetNumDaysInMonth($aMonth, $aYear)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::IsDisplayMonth" is not in camel caps format
                                Open

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

                                Method name "GanttScale::IsDisplayYear" is not in camel caps format
                                Open

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

                                Method name "GanttScale::IsLeap" is not in camel caps format
                                Open

                                    public function IsLeap($aYear)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::GetMonthDayNbr" is not in camel caps format
                                Open

                                    public function GetMonthDayNbr($aDate)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::NormalizeDate" is not in camel caps format
                                Open

                                    public function NormalizeDate($aDate)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::SetTableTitleBackground" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetYearDayNbr" is not in camel caps format
                                Open

                                    public function GetYearDayNbr($aDate)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::TranslateVertPos" is not in camel caps format
                                Open

                                    public function TranslateVertPos($aPos, $atTop = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::IsRangeSet" is not in camel caps format
                                Open

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

                                Method name "GanttScale::AdjustStartEndDay" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetVertSpacing" is not in camel caps format
                                Open

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

                                Method name "GanttScale::SetWeekStart" is not in camel caps format
                                Open

                                    public function SetWeekStart($aStartDay)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::IsDisplayWeek" is not in camel caps format
                                Open

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

                                Method name "GanttScale::SetVertSpacing" is not in camel caps format
                                Open

                                    public function SetVertSpacing($aSpacing)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::GetHeaderHeight" is not in camel caps format
                                Open

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

                                Method name "GanttScale::UseWeekendBackground" is not in camel caps format
                                Open

                                    public function UseWeekendBackground($aShow)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::SetRange" is not in camel caps format
                                Open

                                    public function SetRange($aMin, $aMax)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::ShowHeaders" is not in camel caps format
                                Open

                                    public function ShowHeaders($aFlg)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::GetNumDaysInYear" is not in camel caps format
                                Open

                                    public function GetNumDaysInYear($aYear)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::GetYear" is not in camel caps format
                                Open

                                    public function GetYear($aDate)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::GetWeekNbr" is not in camel caps format
                                Open

                                    public function GetWeekNbr($aDate, $aSunStart = true)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::StrokeMinutes" is not in camel caps format
                                Open

                                    public function StrokeMinutes($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::TranslateDate" is not in camel caps format
                                Open

                                    public function TranslateDate($aDate)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::SetDateLocale" is not in camel caps format
                                Open

                                    public function SetDateLocale($aLocale)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::SetLabelWidth" is not in camel caps format
                                Open

                                    public function SetLabelWidth($aLabelWidth)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::IsDisplayHour" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetDayWidth" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetNumberOfDays" is not in camel caps format
                                Open

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

                                Method name "GanttScale::GetMinuteWidth" is not in camel caps format
                                Open

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

                                Method name "GanttScale::TimeToMinutes" is not in camel caps format
                                Open

                                    public function TimeToMinutes($aTimeString)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::SetVertLayout" is not in camel caps format
                                Open

                                    public function SetVertLayout($aLayout)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

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

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

                                Method name "GanttScale::StrokeDays" is not in camel caps format
                                Open

                                    public function StrokeDays($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::StrokeTableHeaders" is not in camel caps format
                                Open

                                    public function StrokeTableHeaders($aYBottom)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::StrokeYears" is not in camel caps format
                                Open

                                    public function StrokeYears($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::StrokeHours" is not in camel caps format
                                Open

                                    public function StrokeHours($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::StrokeMonths" is not in camel caps format
                                Open

                                    public function StrokeMonths($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::GetMonthLabel" is not in camel caps format
                                Open

                                    public function GetMonthLabel($aMonthNbr, $year)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Method name "GanttScale::StrokeWeeks" is not in camel caps format
                                Open

                                    public function StrokeWeeks($aYCoord, $getHeight = false)
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 156 characters
                                Open

                                                //'Intervall for minutes must divide the hour evenly, e.g. 1,5,10,12,15,20,30 etc You have specified an intervall of '.$minint.' minutes.');
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 164 characters
                                Open

                                                //("Date string ($aDate) specified for Gantt activity can not be interpretated. Please make sure it is a valid time string, e.g. 2005-04-23 13:30");
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 130 characters
                                Open

                                        return ($aDate - $this->iStartDate - $offset) / SECPERDAY * $this->GetDayWidth() + $img->left_margin + $this->iLabelWidth;
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 128 characters
                                Open

                                            $pos = round($img->top_margin + $this->iVertHeaderSize + $this->iTopPlotMargin + ($aPos + 1) * $this->iVertSpacing);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 138 characters
                                Open

                                                $yearwidth = $this->GetDayWidth() * ($this->GetYearDayNbr($this->iEndDate) - $this->GetYearDayNbr($this->iStartDate) + 1);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 131 characters
                                Open

                                                            $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $yb - $this->day->iFrameWeight);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 171 characters
                                Open

                                                //('The available width ('.$width.') for minutes are to small for this scale to be displayed. Please use auto-sizing or increase the width of the graph.');
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 144 characters
                                Open

                                                //('Intervall for hours must divide the day evenly, e.g. 0:30, 1:00, 1:30, 4:00 etc. You have specified an intervall of '.$tmp);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 141 characters
                                Open

                                                $monthwidth = $this->GetDayWidth() * ($this->GetMonthDayNbr($this->iEndDate) - $this->GetMonthDayNbr($this->iStartDate) + 1);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 131 characters
                                Open

                                                $yearwidth = $this->GetDayWidth() * ($this->GetNumDaysInYear($year) - $this->GetYearDayNbr($this->iStartDate) + 1);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 139 characters
                                Open

                                                                $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $img->height - $img->bottom_margin);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 135 characters
                                Open

                                                                $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $yb - $this->day->iFrameWeight);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 135 characters
                                Open

                                                            $img->FilledRectangle($x, $yt + $this->day->iFrameWeight, $x + $width, $img->height - $img->bottom_margin);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 138 characters
                                Open

                                            //('If you display both hour and minutes the hour intervall must be 1 (Otherwise it doesn\' make sense to display minutes).');
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                Line exceeds 120 characters; contains 145 characters
                                Open

                                                $monthwidth = $this->GetDayWidth() * ($this->GetNumDaysInMonth($monthnbr, $year) - $this->GetMonthDayNbr($this->iStartDate) + 1);
                                Severity: Minor
                                Found in src/graph/GanttScale.php by phpcodesniffer

                                There are no issues that match your filters.

                                Category
                                Status