Showing 706 of 6,805 total issues
Graph
has 92 functions (exceeds 20 allowed). Consider refactoring. Open
class Graph
{
public $gDateLocale;
public $gJpgDateLocale;
public $cache; // Cache object (singleton)
File PiePlot3D.php
has 745 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Image
has 85 functions (exceeds 20 allowed). Consider refactoring. Open
class Image
{
public $img;
public $rgb;
public $img_format;
Function Stroke
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg)
{
// Constant
$fillBoxFrameWeight = 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 Stroke
has a Cognitive Complexity of 77 (exceeds 5 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
- 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 AutoSize
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
public function AutoSize()
{
if ($this->img->img == null) {
// The predefined left, right, top, bottom margins.
// Note that the top margin might incease depending on
- 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 StrokeAngleLabels
has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeAngleLabels($pos, $type)
{
if (!$this->show_angle_label) {
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
Method Stroke
has 306 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$numpoints = safe_count($this->coords[0]);
if (isset($this->coords[1])) {
if (safe_count($this->coords[1]) != $numpoints) {
Function Stroke
has a Cognitive Complexity of 76 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $scale, $pos)
{
$start = $scale->GetMinVal();
$limit = $scale->GetMaxVal();
$nextMajor = 10 * $start;
- 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 GanttGraph.php
has 649 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Function Stroke
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $x, $y)
{
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 _StrokeRegularRose
has a Cognitive Complexity of 67 (exceeds 5 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
- 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 Stroke
has 262 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $x, $y)
{
if (!$this->show) {
return;
}
File BarPlot.php
has 595 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Function _StrokeFreeRose
has a Cognitive Complexity of 65 (exceeds 5 allowed). Consider refactoring. Open
public function _StrokeFreeRose($dblImg, $value, $scaling, $xc, $yc, $r, $ri)
{
// Plot radial grid lines and remember the end position
// and the angle for later use when plotting the labels
if ($this->iType != WINDROSE_TYPEFREE) {
- 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 65 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
// Fist make a sanity check that user has specified a scale
if (empty($this->yscale)) {
Util\JpGraphError::RaiseL(25031); //('You must specify what scale to use with a call to Graph::SetScale().');
- 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 Pie3D
has 250 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Pie3D(
$aaoption,
$img,
$data,
$colors,
Method Stroke
has 248 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$pattern = null;
$img->SetLineWeight($this->weight);
$grad = null;
Function SetAutoScaleAngle
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function SetAutoScaleAngle($aIsRegRose = true)
{
// If the user already has manually set an angle don't
// trye to find a position
if (is_numeric($this->scale->iAngle)) {
- 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 doAutoscaleXAxis
has a Cognitive Complexity of 63 (exceeds 5 allowed). Consider refactoring. Open
public function doAutoscaleXAxis()
{
$aPlots = array_filter($this->plots, 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"