HuasoFoundries/jpgraph

View on GitHub

Showing 706 of 6,805 total issues

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

    public function ShadowRectangle($xl, $yu, $xr, $yl, $fcolor = false, $shadow_width = 4, $shadow_color = 'darkgray', $useAlpha = true)
Severity: Major
Found in src/image/Image.php - About 1 hr to fix

    Method Set3DPerspective has 8 arguments (exceeds 4 allowed). Consider refactoring.
    Open

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

      Method _gdImgHandle has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public function _gdImgHandle($agdCanvas, $x, $y, $fx = 0, $fy = 0, $w = 0, $h = 0, $mix = 100)
      Severity: Major
      Found in src/graph/MGraph.php - About 1 hr to fix

        Method AddMix has 8 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function AddMix($aGraph, $x = 0, $y = 0, $mix = 100, $fx = 0, $fy = 0, $w = 0, $h = 0)
        Severity: Major
        Found in src/graph/MGraph.php - About 1 hr to fix

          Function getCrossingCoord has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getCrossingCoord($aRow, $aCol, $aEdgeDir, $aIsobarVal)
              {
                  // In order to avoid numerical problem when two vertices are very close
                  // we have to check and avoid dividing by close to zero denumerator.
                  if ($aEdgeDir == HORIZ_EDGE) {
          Severity: Minor
          Found in src/plot/Contour.php - About 55 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 _GetLED has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function _GetLED($aLedIdx, $aColor = 0)
              {
                  $width  = $this->iLED_X * $this->iRad * 2 + ($this->iLED_X + 1) * $this->iMarg + $this->iRad;
                  $height = $this->iLED_Y * $this->iRad * 2 + ($this->iLED_Y) * $this->iMarg + $this->iRad * 2;
          
          
          Severity: Minor
          Found in src/image/DigitalLED74.php - About 55 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 GetTextHeight has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function GetTextHeight($txt = '', $angle = 0)
              {
                  $tmp = preg_split('/\n/', $txt);
                  $n   = safe_count($tmp);
                  $m   = 0;
          Severity: Minor
          Found in src/image/Image.php - About 55 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 ApplyPlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ApplyPlot($plot)
              {
                  switch (get_class($plot)) {
                      case 'GroupBarPlot':
                              foreach ($plot->plots as $_plot) {
          Severity: Minor
          Found in src/themes/VividTheme.php - About 55 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 FromReal has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function FromReal($aVal, $aPrecision = 2)
              {
                  // Convert a floating point number to scientific notation
                  $neg = 1.0;
                  if ($aVal < 0) {
          Severity: Minor
          Found in src/text/SuperScriptText.php - About 55 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 ApplyPlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ApplyPlot($plot)
              {
                  switch (get_class($plot)) {
                      case 'GroupBarPlot':
                              foreach ($plot->plots as $_plot) {
          Severity: Minor
          Found in src/themes/OceanTheme.php - About 55 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 ApplyPlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ApplyPlot($plot)
              {
                  switch (get_class($plot)) {
                      case 'GroupBarPlot':
                              foreach ($plot->plots as $_plot) {
          Severity: Minor
          Found in src/themes/RoseTheme.php - About 55 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 ApplyPlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ApplyPlot($plot)
              {
                  switch (get_class($plot)) {
                      case 'GroupBarPlot':
                              foreach ($plot->plots as $_plot) {
          Severity: Minor
          Found in src/themes/GreenTheme.php - About 55 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 Raise has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function Raise($aMsg, $aHalt = true)
              {
                  $img_iconerror =
                      'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaV' .
                      'BMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/' .
          Severity: Minor
          Found in src/util/JpGraphErrObjectImg.php - About 55 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 ApplyPlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ApplyPlot($plot)
              {
                  switch (get_class($plot)) {
                      case 'GroupBarPlot':
                              foreach ($plot->plots as $_plot) {
          Severity: Minor
          Found in src/themes/OrangeTheme.php - About 55 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 ApplyPlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ApplyPlot($plot)
              {
                  switch (get_class($plot)) {
                      case 'GroupBarPlot':
                              foreach ($plot->plots as $_plot) {
          Severity: Minor
          Found in src/themes/PastelTheme.php - About 55 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 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function Stroke($aImg, $scale)
              {
                  // If coordinates are specifed as negative this means we should
                  // treat them as abolsute (pixels) coordinates
                  if ($this->ix > 0) {
          Severity: Minor
          Found in src/text/CanvasRectangleText.php - About 55 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 IndentedRectangle has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function IndentedRectangle($xt, $yt, $w, $h, $iw = 0, $ih = 0, $aCorner = 3, $aFillColor = '', $r = 4)
              {
                  list($xt, $yt) = $this->scale->Translate($xt, $yt);
                  list($w, $h)   = $this->scale->Translate($w, $h);
                  list($iw, $ih) = $this->scale->Translate($iw, $ih);
          Severity: Minor
          Found in src/graph/Shape.php - About 55 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 GetPoint has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function GetPoint($mu)
              {
                  $n     = $this->n - 1;
                  $k     = 0;
                  $kn    = 0;
          Severity: Minor
          Found in src/util/Bezier.php - About 55 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 ApplyPlot has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function ApplyPlot($plot)
              {
                  switch (get_class($plot)) {
                      case 'GroupBarPlot':
                              foreach ($plot->plots as $_plot) {
          Severity: Minor
          Found in src/themes/AquaTheme.php - About 55 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 AddY2 has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              public function AddY2($aPlot)
              {
                  if ($aPlot == null) {
                      Util\JpGraphError::RaiseL(25011); //("Graph::AddY2() You tried to add a null plot to the graph.");
                  }
          Severity: Minor
          Found in src/graph/Graph.php - About 55 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