Showing 706 of 6,805 total issues
Function PutAndStream
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
public function PutAndStream($aImage, $aCacheFileName, $aInline, $aStrokeFileName)
{
// Check if we should always stroke the image to a file
if (_FORCE_IMGTOFILE) {
$aStrokeFileName = _FORCE_IMGDIR . Util\Helper::GenImgName();
- 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 doMonthly
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public static function doMonthly($aType, $aMinor = false)
{
$monthcount = 0;
$m = self::$startmonth;
$y = self::$startyear;
- 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 StrokeMinutes
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeMinutes($aYCoord, $getHeight = false)
{
$img = $this->iImg;
$xt = $img->left_margin + $this->iLabelWidth;
$yt = $aYCoord + $img->top_margin;
- 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 StrokeAngleLabels
has 168 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeAngleLabels($pos, $type)
{
if (!$this->show_angle_label) {
return;
}
Method Stroke
has 167 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $aaoption = 0)
{
// aaoption is used to handle antialias
// aaoption == 0 a normal pie
// aaoption == 1 just the body
File LinearScale.php
has 444 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method StrokeGuideLabels
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeGuideLabels($img, $xc, $yc, $radius)
{
$n = safe_count($this->labels);
/**
Function Stroke
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
// If the filename is the predefined value = '_csim_special_'
// we assume that the call to stroke only needs to do enough
// to correctly generate the CSIM maps.
- 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
GanttScale
has 46 functions (exceeds 20 allowed). Consider refactoring. Open
class GanttScale
{
public $minute;
public $hour;
public $day;
File PlotMark.php
has 428 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Function LineInterpolate
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function LineInterpolate(&$aData)
{
$n = safe_count($aData);
$i = 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
Function Pie3DSlice
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function Pie3DSlice($img, $xc, $yc, $w, $h, $sa, $ea, $z, $fillcolor, $shadow = 0.65)
{
// Due to the way the 3D Pie algorithm works we are
// guaranteed that any slice we get into this method
// belongs to either the left or right side of the
- 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 Pie3DSlice
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Pie3DSlice($img, $xc, $yc, $w, $h, $sa, $ea, $z, $fillcolor, $shadow = 0.65)
{
// Due to the way the 3D Pie algorithm works we are
// guaranteed that any slice we get into this method
// belongs to either the left or right side of the
Function getIsobars
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
public function getIsobars()
{
$this->adjustDataPointValues();
for ($isobar = 0; $isobar < $this->nbrIsobars; ++$isobar) {
- 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 _doLabelFormat
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function _doLabelFormat($aVal, $aIdx, $aNbrTicks)
{
// If precision hasn't been specified set it to a sensible value
if ($this->precision == -1) {
$t = log10($this->minor_step);
- 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
File PolarAxis.php
has 413 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Function Stroke
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg)
{
// The way the path for the arrow is constructed is partly based
// on some heuristics. This is not an exact science but draws the
// path in a way that, for me, makes esthetic sence. For example
- 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 doAutoScaleYnAxis
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function doAutoScaleYnAxis()
{
if ($this->y2scale != null) {
if (!$this->y2scale->IsSpecified() && safe_count($this->y2plots) > 0) {
list($min, $max) = $this->GetPlotsYMinMax($this->y2plots);
- 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
File config.inc.php
has 406 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph - Community Edition
*/
Method _StrokeRegularRose
has 140 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _StrokeRegularRose($dblImg, $value, $scaling, $xc, $yc, $r, $ri)
{
// _StrokeRegularRose($dblImg,$xc,$yc,$r,$ri)
// Plot radial grid lines and remember the end position
// and the angle for later use when plotting the labels