Showing 706 of 6,805 total issues
Method DashedLine
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function DashedLine($x1, $y1, $x2, $y2, $dash_length = 1, $dash_space = 4)
Method DashedLineForGrid
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function DashedLineForGrid($x1, $y1, $x2, $y2, $dash_length = 1, $dash_space = 4)
Avoid deeply nested control flow statements. Open
if (!$aaStartX) {
imagesetpixel($img, $cx + $xp * ($x1 - 1) + $xa, $cy + $yp * $y + $ya, $diffColor2);
}
Avoid deeply nested control flow statements. Open
if (!($y == self::$endyear && $m > self::$endmonth)) {
self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 1, $y);
}
Function GetWidth
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function GetWidth($aImg)
{
if ($this->iIcon !== null) {
if ($this->iIconConstrain[0] == TIMG_WIDTH) {
$this->iIcon->SetScale(1);
- 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 CalcTicks
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function CalcTicks($maxsteps, $min, $max, $a, $b, $majend = true)
Method RaiseL
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function RaiseL($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
Function SetFillColor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function SetFillColor($aArgR1, $aC1 = null, $aR2 = null, $aC2 = null, $aArg = null)
{
if ($aC1 !== null && $aR2 !== null && $aC2 !== null && $aArg !== null) {
$this->_chkR($aArgR1);
$this->_chkC($aC1);
- 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 StrokeHGrid
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function StrokeHGrid($aImg, $aX, $aY, $aWidth, $aHeight, $aDir = 1)
Function GenImgName
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static function GenImgName()
{
// Determine what format we should use when we save the images
$supported = imagetypes();
if ($supported & IMG_PNG) {
- 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 StrokeVGrid
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function StrokeVGrid($aImg, $aX, $aY, $aWidth, $aHeight, $aDir = 1)
Method SetAlign
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function SetAlign($aR1HAlign = null, $aC1VAlign = null, $aR2 = null, $aC2 = null, $aHArg = null, $aVArg = 'center')
Method SetCellCountryFlag
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function SetCellCountryFlag($aRow, $aCol, $aFlag, $aScale = 1.0, $aMix = 100, $aStdSize = 3)
Avoid deeply nested control flow statements. Open
if ($m <= $stopmonth) {
if (!($y == self::$endyear && $m == $stopmonth && self::$endday < 15)) {
self::$minTickPositions[$j++] = mktime(0, 0, 0, $m, 15, $y);
}
}
Method MergeCells
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function MergeCells($aR1, $aC1, $aR2, $aC2, $aHAlign = 'center', $aVAlign = 'center')
Function GetMonthLabel
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function GetMonthLabel($aMonthNbr, $year)
{
$sn = $this->iDateLocale->GetShortMonthName($aMonthNbr);
$ln = $this->iDateLocale->GetLongMonthName($aMonthNbr);
switch ($this->month->iStyle) {
- 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
Function AddY
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function AddY($aN, $aPlot)
{
if ($aPlot == null) {
Util\JpGraphError::RaiseL(25012); //("Graph::AddYN() You tried to add a null plot to the graph.");
}
- 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 SetFrameBevel
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function SetFrameBevel($aDepth = 3, $aBorder = false, $aBorderColor = 'black', $aColor1 = 'white@0.4', $aColor2 = 'darkgray@0.4', $aFlg = true)
Avoid deeply nested control flow statements. Open
if ($this->ynscale[$i]->ticks->label_formatstr == '' && $this->ynscale[$i]->ticks->label_dateformatstr == '') {
$this->ynscale[$i]->ticks->precision = abs(floor(log10(abs(floor($min) - $min)))) + 1;
}
Method Stroke
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function Stroke($aImg, $aXLeft, $aYTop, $aXRight, $aYBottom, $aUseTextHeight = false)