Showing 706 of 6,805 total issues
Function _autoSizeTable
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function _autoSizeTable($aImg)
{
// Get maximum column width and row height
$m = $this->iSize[0];
$n = $this->iSize[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 Raise
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function Raise($aMsg, $aHalt = false)
{
if ($this->iDest != '') {
if ($this->iDest == 'syslog') {
error_log($this->iTitle . $aMsg);
- 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 Stroke
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $grid)
{
if (!$this->show) {
return;
}
- 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 DisplayClientSideaImageMapAreas
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function DisplayClientSideaImageMapAreas()
{
// Debug stuff - display the outline of the image map areas
$csim = '';
foreach ($this->plots as $p) {
- 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 GetPlotsYMinMax
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function GetPlotsYMinMax($bPlots)
{
$aPlots = array_filter($bPlots, function ($plot) {
//\Kint::dump($plot, $plot instanceof Plot\Plot);
return $plot instanceof Plot\Plot;
- 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 AutoScale
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function AutoScale($img, $min, $max, $maxsteps, $majend = true)
{
if ($min == 0) {
$min = 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 DisplayCSIMAreas
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public function DisplayCSIMAreas()
{
$csim = '';
foreach ($this->plots as $p) {
$csim .= $p->GetCSIMareas();
- 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 StyleLine
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StyleLine($x1, $y1, $x2, $y2, $aStyle = '', $from_grid_class = false)
{
if ($this->line_weight <= 0) {
return;
}
Method ApplyPlot
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method StrokeFullSliceFrame
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
public function StrokeFullSliceFrame($img, $xc, $yc, $sa, $ea, $w, $h, $z, $edgecolor, $exploderadius, $fulledge)
Method _imageSmoothArcDrawSegment
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
private function _imageSmoothArcDrawSegment(&$img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $seg)
Method Stroke
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg)
{
list($dx, $dy) = $this->isizespec[$this->iSize];
$x = $this->ix;
$y = $this->iy;
Method Set
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Set($aLocale)
{
if (in_array($aLocale, array_keys($this->iDayAbb), true)) {
$this->iLocale = $aLocale;
Method SetTickDensity
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetTickDensity($aYDensity = TICKD_NORMAL, $aXDensity = TICKD_NORMAL)
{
$this->xtick_factor = 30;
$this->ytick_factor = 25;
switch ($aYDensity) {
Method StrokeTableHeaders
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeTableHeaders($aYBottom)
{
$img = $this->iImg;
$xt = $img->left_margin;
$yt = $img->top_margin;
Consider simplifying this complex logical expression. Open
if (($this->yaxis->pos == $this->xscale->GetMinVal() || (is_string($this->yaxis->pos) && $this->yaxis->pos == 'min')) &&
!is_numeric($this->xaxis->pos) && $this->yscale->GetMinVal() < 0 &&
substr($this->axtype, 0, 4) != 'text' && $this->xaxis->pos != 'min') {
//$this->yscale->ticks->SupressZeroLabel(false);
$this->xscale->ticks->SupressFirst();
Method Legend
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Legend($graph)
{
if ($this->legend != '') {
if ($this->filled && !$this->fillgrad) {
$graph->legend->Add(
Method _GetLED
has 33 lines of code (exceeds 25 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;
Method ApplyPlot
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method GetPoint
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetPoint($mu)
{
$n = $this->n - 1;
$k = 0;
$kn = 0;