HuasoFoundries/jpgraph

View on GitHub

Showing 706 of 6,805 total issues

Method ShadowRectangle has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function ShadowRectangle($x1, $y1, $x2, $y2, $fcolor = false, $shadow_width = null, $shadow_color = [102, 102, 102])
Severity: Major
Found in src/graph/Shape.php - About 50 mins to fix

    Method SetImage has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function SetImage($aFileR1, $aScaleC1 = null, $aMixR2 = null, $aC2 = null, $aFile = null, $aScale = 1.0, $aMix = 100)
    Severity: Major
    Found in src/text/GTextTable.php - About 50 mins to fix

      Method SetTitleBackground has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function SetTitleBackground($aBackColor = 'gray', $aStyle = TITLEBKG_STYLE1, $aFrameStyle = TITLEBKG_FRAME_NONE, $aFrameColor = 'black', $aFrameWeight = 1, $aBevelHeight = 3, $aEnable = true)
      Severity: Major
      Found in src/graph/Graph.php - About 50 mins to fix

        Method Add has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function Add($aTxt, $aColor, $aPlotmark = '', $aLinestyle = 0, $csimtarget = '', $csimalt = '', $csimwintarget = '')
        Severity: Major
        Found in src/graph/Legend.php - About 50 mins to fix

          Method Stroke has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel)
          Severity: Major
          Found in src/graph/RadarLogTicks.php - About 50 mins to fix

            Method Stroke has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel)
            Severity: Major
            Found in src/graph/RadarLinearTicks.php - About 50 mins to fix

              Method Add has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  public function Add($aGraph, $x = 0, $y = 0, $fx = 0, $fy = 0, $w = 0, $h = 0)
              Severity: Major
              Found in src/graph/MGraph.php - About 50 mins to fix

                Method _ThickCircle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function _ThickCircle($aImg, $aXC, $aYC, $aRad, $aWeight, $aColor)
                Severity: Minor
                Found in src/plot/WindrosePlot.php - About 45 mins to fix

                  Method SetCountryFlag has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      public function SetCountryFlag($aFlag, $aX = 0, $aY = 0, $aScale = 1.0, $aMix = 100, $aStdSize = 3)
                  Severity: Minor
                  Found in src/plot/IconPlot.php - About 45 mins to fix

                    Method StrokeLabel has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        public function StrokeLabel($label, $img, $xc, $yc, $a, $r)
                    Severity: Minor
                    Found in src/plot/PiePlot.php - About 45 mins to fix

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

                          public function NormAngle($a)
                          {
                              // Normalize anle to 0 to 2M_PI
                              //
                              if ($a > 0) {
                      Severity: Minor
                      Found in src/plot/PiePlot3D.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

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

                          public function Stroke($img, $xscale, $yscale)
                          {
                              $img->SetLineWeight($this->weight);
                              $this->numpoints = safe_count($this->plots[0]->coords[0]);
                              // Allocate array
                      Severity: Minor
                      Found in src/plot/AccLinePlot.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

                      Method AddSliceToCSIM has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea)
                      Severity: Minor
                      Found in src/plot/PiePlotC.php - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                        if (abs($a3 - $a2) >= $tresh_hold) {
                                                            ++$clusters[$cidx][1];
                                                            ++$i;
                                                        }
                        Severity: Major
                        Found in src/plot/PiePlot.php - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if ($midval == $ib) {
                                                      // Orientation "+"
                                                      $n1 = 0;
                                                      $n2 = 1;
                                                      $n3 = 2;
                          Severity: Major
                          Found in src/plot/Contour.php - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if (abs($a3 - $a2) >= $tresh_hold) {
                                                                ++$clusters[$cidx][1];
                                                                ++$i;
                                                            }
                            Severity: Major
                            Found in src/plot/PiePlot.php - About 45 mins to fix

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

                                  public function __construct($plots)
                                  {
                                      $this->plots    = $plots;
                                      $this->nbrplots = safe_count($plots);
                                      if ($this->nbrplots < 1) {
                              Severity: Minor
                              Found in src/plot/AccBarPlot.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

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

                                  public function __construct($aPos, $aLabel, $aStart, $aEnd, $aCaption = '', $aHeightFactor = 0.6)
                              Severity: Minor
                              Found in src/plot/GanttBar.php - About 45 mins to fix

                                Method StrokeLabels has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function StrokeLabels($label, $img, $a, $xp, $yp, $z)
                                Severity: Minor
                                Found in src/plot/PiePlot3D.php - About 45 mins to fix

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

                                      public function __construct($aDatay, $aDatax = false)
                                      {
                                          $this->numpoints = safe_count($aDatay);
                                          if ($this->numpoints == 0) {
                                              Util\JpGraphError::RaiseL(25121); //("Empty input data array specified for plot. Must have at least one data point.");
                                  Severity: Minor
                                  Found in src/plot/Plot.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

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language