Showing 706 of 6,805 total issues
Method AddSliceToCSIM
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea)
Method StrokeLabel
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function StrokeLabel($label, $img, $xc, $yc, $a, $r)
Function _StrokeLegend
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function _StrokeLegend($aImg, $x, $y, $scaling = 1, $aReturnWidth = false)
{
if (!$this->legend->iShow) {
return 0;
}
- Read upRead up
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
Open
if (abs($a3 - $a2) >= $tresh_hold) {
++$clusters[$cidx][1];
++$i;
}
Method Arc
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function Arc($xc, $yc, $w, $h, $s, $e)
Method StrokeText
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function StrokeText($x, $y, $txt, $dir = 0, $paragraph_align = 'left', $debug = false)
Avoid deeply nested control flow statements. Open
Open
if ($numcolors == 0) {
Util\JpGraphError::RaiseL(2013); //('You have specified an empty array for shadow colors in the bar plot.');
}
Method Get
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function Get($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
Method Arc
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function Arc($cx, $cy, $w, $h, $s, $e)
Method StyleLine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function StyleLine($x1, $y1, $x2, $y2, $aStyle = '', $from_grid_class = false)
Avoid deeply nested control flow statements. Open
Open
if ($accy > 0) {
$sp[4] = $pts[4] + $ssh;
$sp[5] = $pts[5] - $ssv;
$sp[6] = $pts[2] + $ssh;
$sp[7] = $pts[3] - $ssv;
Avoid deeply nested control flow statements. Open
Open
if ($a5 !== null) {
$argv[$j++] = $a5;
}
Method StrokeText
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function StrokeText($x, $y, $txt, $dir = 0, $paragraph_align = 'left', $debug = false)
Method FilledCakeSlice
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function FilledCakeSlice($cx, $cy, $w, $h, $s, $e)
Function Stroke
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
public function Stroke()
{
$n = strlen($this->iData);
if ($n == 0) {
return false;
- Read upRead up
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
Open
public function __construct($errcode, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
Method DashedLine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public function DashedLine($x1, $y1, $x2, $y2, $dash_length = 1, $dash_space = 4)
Avoid deeply nested control flow statements. Open
Open
if (!$aaStopX) {
imagesetpixel($img, $cx + $xp * ($x1 - 1) + $xa, $cy + $yp * ($y) + $ya, $diffColor1);
}
Avoid deeply nested control flow statements. Open
Open
if (!empty($this->plots[$j]->csimalts[$i])) {
$sval = sprintf($this->plots[$j]->csimalts[$i], $this->plots[$j]->coords[0][$i]);
$this->csimareas .= " title=\"${sval}\" ";
}
Avoid deeply nested control flow statements. Open
Open
if (!empty($this->plots[$j]->csimwintargets[$i])) {
$this->csimareas .= ' target="' . $this->plots[$j]->csimwintargets[$i] . '" ';
}