HuasoFoundries/jpgraph

View on GitHub

Showing 706 of 6,805 total issues

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

    public function __construct($aWidth = 300, $aHeight = 200, $aCachedName = '', $aTimeOut = 0, $aInline = true)
Severity: Minor
Found in src/graph/PolarGraph.php - About 35 mins to fix

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

        private function _normalizeTestGroup($filename, &$ownFixtures = [], $example_title = 'file_iterator', $debug = false, $attributes = [])
    Severity: Minor
    Found in tests/UnitTestTrait.php - About 35 mins to fix

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

          public function SetScale($aScale, $rmax = 0, $dummy1 = 1, $dummy2 = 1, $dummy3 = 1)
      Severity: Minor
      Found in src/graph/PolarGraph.php - About 35 mins to fix

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

            public function AutoScale($img, $min, $max, $maxsteps, $majend = true)
        Severity: Minor
        Found in src/graph/LogScale.php - About 35 mins to fix

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

              public function __construct($aWidth = 300, $aHeight = 200, $aCachedName = '', $timeout = 0, $inline = 1)
          Severity: Minor
          Found in src/graph/CanvasGraph.php - About 35 mins to fix

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

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

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

                  public static function renameIfDimensionsDontMatch($exampleRoot, $filename, $__width, $__height, $size)
              Severity: Minor
              Found in tests/UnitTestTrait.php - About 35 mins to fix

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

                    public function __construct($aWidth = null, $aHeight = null, $aCachedName = '', $aTimeOut = 0, $aInline = true)
                Severity: Minor
                Found in src/graph/MGraph.php - About 35 mins to fix

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

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

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

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

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

                          public function __construct($aWidth = 0, $aHeight = 0, $aCachedName = '', $aTimeOut = 0, $aInline = true)
                      Severity: Minor
                      Found in src/graph/GanttGraph.php - About 35 mins to fix

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

                            public function SetScale($aAxisType, $aYMin = 1, $aYMax = 1, $aXMin = 1, $aXMax = 1)
                        Severity: Minor
                        Found in src/graph/GanttGraph.php - About 35 mins to fix

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

                              public function Legend($aGraph)
                              {
                                  if (!$this->showLegend) {
                                      return;
                                  }
                          Severity: Minor
                          Found in src/plot/ContourPlot.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                              public function Stroke($aImg, $aScale)
                              {
                                  $d = $aScale->NormalizeDate($this->iStart);
                                  if ($d < $aScale->iStartDate || $d > $aScale->iEndDate) {
                                      return;
                          Severity: Minor
                          Found in src/plot/GanttVLine.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                              public function SetFont($family, $style = FS_NORMAL, $size = 10)
                              {
                                  $this->font_family = $family;
                                  $this->font_style  = $style;
                                  $this->font_size   = $size * SUPERSAMPLING_SCALE;
                          Severity: Minor
                          Found in src/image/Image.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                              public function GetImg($aMark, $aIdx)
                              {
                                  $n = $this->an[$aMark];
                                  if (is_string($aIdx)) {
                                      if (!in_array($aIdx, $this->colors, true)) {
                          Severity: Minor
                          Found in src/image/ImgData.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                              public function GetHeight($aImg)
                              {
                                  if ($this->iIcon !== null) {
                                      if ($this->iIconConstrain[0] == TIMG_WIDTH) {
                                          $this->iIcon->SetScale(1);
                          Severity: Minor
                          Found in src/text/GTextTableCell.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                              public function GetThemeColors($num = 30)
                              {
                                  $result_list = [];
                          
                                  $old_index         = $this->color_index;
                          Severity: Minor
                          Found in src/themes/Theme.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                              public function __construct($datax, $datay, $attraction_factor = 1)
                              {
                                  // Adding control point multiple time will raise their attraction power over the curve
                                  $this->n = safe_count($datax);
                                  if ($this->n !== safe_count($datay)) {
                          Severity: Minor
                          Found in src/util/Bezier.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

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

                              public function GetNextColor()
                              {
                                  $color_list = $this->GetColorList();
                          
                                  $color = null;
                          Severity: Minor
                          Found in src/themes/Theme.php - About 35 mins to fix

                          Cognitive Complexity

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

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

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

                          Further reading

                          Severity
                          Category
                          Status
                          Source
                          Language