Showing 706 of 6,805 total issues
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)
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])
Method Add
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function Add($aTxt, $aColor, $aPlotmark = '', $aLinestyle = 0, $csimtarget = '', $csimalt = '', $csimwintarget = '')
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)
Method Stroke
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel)
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)
Method Stroke
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel)
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
- 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 AddSliceToCSIM
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea)
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)
Avoid deeply nested control flow statements. Open
if (abs($a3 - $a2) >= $tresh_hold) {
++$clusters[$cidx][1];
++$i;
}
Method StrokeLabel
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function StrokeLabel($label, $img, $xc, $yc, $a, $r)
Method StrokeLabels
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function StrokeLabels($label, $img, $a, $xp, $yp, $z)
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.");
- 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
public function __construct($aPos, $aLabel, $aStart, $aEnd, $aCaption = '', $aHeightFactor = 0.6)
Method _ThickCircle
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function _ThickCircle($aImg, $aXC, $aYC, $aRad, $aWeight, $aColor)
Function GetAbsHeight
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function GetAbsHeight($aImg)
{
if (is_int($this->iHeightFactor) || $this->leftMark->show || $this->rightMark->show) {
$m = -1;
if (is_int($this->iHeightFactor)) {
- 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 __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) {
- 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 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) {
- 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
if ($midval == $ib) {
// Orientation "+"
$n1 = 0;
$n2 = 1;
$n3 = 2;