HuasoFoundries/jpgraph

View on GitHub

Showing 706 of 6,805 total issues

Method Copy has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function Copy($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1)
Severity: Major
Found in src/image/Image.php - About 1 hr to fix

    Method DrawImageSmoothArc has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public function DrawImageSmoothArc($im, $xc, $yc, $w, $h, $s, $e, $color, $style = null)
    Severity: Major
    Found in src/image/Image.php - About 1 hr to fix

      Method _TransVert3D has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function _TransVert3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_DOWN, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5)
      Severity: Major
      Found in src/image/ImgTrans.php - About 1 hr to fix

        Method _TransHor3D has 9 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function _TransHor3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_LEFT, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5)
        Severity: Major
        Found in src/image/ImgTrans.php - About 1 hr to fix

          Method IndentedRectangle has 9 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              public function IndentedRectangle($xt, $yt, $w, $h, $iw = 0, $ih = 0, $aCorner = 3, $aFillColor = '', $r = 4)
          Severity: Major
          Found in src/graph/Shape.php - About 1 hr to fix

            Method StrokeNumber has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function StrokeNumber($aValStr, $aColor = 0, $aFileName = '')
                {
                    if ($aColor < 0 || $aColor >= safe_count($this->iColorSchema)) {
                        $aColor = 0;
                    }
            Severity: Minor
            Found in src/image/DigitalLED74.php - About 1 hr to fix

              Method FastStroke has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function FastStroke($img, $xscale, $yscale, $aStartPoint = 0, $exist_x = true)
                  {
                      // An optimized stroke for many data points with no extra
                      // features but 60% faster. You can't have values or line styles, or null
                      // values in plots.
              Severity: Minor
              Found in src/plot/LinePlot.php - About 1 hr to fix

                Method GetIdxByName has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function GetIdxByName($aName, &$outFullName)
                    {
                        if (is_integer($aName)) {
                            $idx = $this->GetIdxByOrdinal($aName, $outFullName);
                
                
                Severity: Minor
                Found in src/image/FlagImages.php - About 1 hr to fix

                  Method Add has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

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

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

                        public function __construct($aWidth = null, $aHeight = null, $aCachedName = '', $aTimeOut = 0, $aInline = true)
                        {
                            $this->iWidth  = $aWidth;
                            $this->iHeight = $aHeight;
                    
                    
                    Severity: Minor
                    Found in src/graph/MGraph.php - About 1 hr to fix

                      Function adjustDataPointValues has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function adjustDataPointValues()
                          {
                              $ni = safe_count($this->isobarValues);
                              for ($k = 0; $k < $ni; ++$k) {
                                  $ib = $this->isobarValues[$k];
                      Severity: Minor
                      Found in src/plot/Contour.php - About 1 hr 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 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function Stroke($img, $aaoption = 0)
                          {
                              // Stroke the pie but don't stroke values
                              $tmp               = $this->value->show;
                              $this->value->show = false;
                      Severity: Minor
                      Found in src/plot/PiePlotC.php - About 1 hr 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 Min has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function Min()
                          {
                              $nmax                 = 0;
                              list($xmin, $ysetmin) = $this->plots[0]->Min();
                              for ($i = 0; $i < safe_count($this->plots); ++$i) {
                      Severity: Minor
                      Found in src/plot/AccBarPlot.php - About 1 hr 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 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function __construct($aMatrix, $aIsobars = 10, $aColors = null)
                          {
                              $this->nbrRows    = safe_count($aMatrix);
                              $this->nbrCols    = safe_count($aMatrix[0]);
                              $this->dataPoints = $aMatrix;
                      Severity: Minor
                      Found in src/plot/Contour.php - About 1 hr 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 FilledRectangle2 has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function FilledRectangle2($xl, $yu, $xr, $yl, $color1, $color2, $style = 1)
                          {
                              // Fill a rectangle with lines of two colors
                              if ($style === 1) {
                                  // Horizontal stripe
                      Severity: Minor
                      Found in src/image/Image.php - About 1 hr 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 Linear has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function Linear(&$aData, $aIntFactor)
                          {
                              $step = pow(2, $aIntFactor - 1);
                      
                              $orig_cols = safe_count($aData[0]);
                      Severity: Minor
                      Found in src/plot/MeshInterpolate.php - About 1 hr 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 StrokeNumber has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function StrokeNumber($aValStr, $aColor = 0, $aFileName = '')
                          {
                              if ($aColor < 0 || $aColor >= safe_count($this->iColorSchema)) {
                                  $aColor = 0;
                              }
                      Severity: Minor
                      Found in src/image/DigitalLED74.php - About 1 hr 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 MakeDirs has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function MakeDirs($aFile)
                          {
                              $dirs = [];
                              // In order to better work when open_basedir is enabled
                              // we do not create directories in the root path
                      Severity: Minor
                      Found in src/image/ImgStreamCache.php - About 1 hr 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 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function Stroke($aImg)
                          {
                              list($dx, $dy) = $this->isizespec[$this->iSize];
                              $x             = $this->ix;
                              $y             = $this->iy;
                      Severity: Minor
                      Found in src/image/LinkArrow.php - About 1 hr 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 SetAlign has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function SetAlign($aR1HAlign = null, $aC1VAlign = null, $aR2 = null, $aC2 = null, $aHArg = null, $aVArg = 'center')
                          {
                              if ($aC1VAlign !== null && $aR2 !== null && $aC2 !== null && $aHArg !== null) {
                                  $this->_chkR($aR1HAlign);
                                  $this->_chkC($aC1VAlign);
                      Severity: Minor
                      Found in src/text/GTextTable.php - About 1 hr 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