Showing 706 of 6,805 total issues
Function StrokeLabel
has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeLabel($label, $img, $xc, $yc, $a, $r)
{
// Default value
if ($this->ilabelposadj === 'auto') {
$this->ilabelposadj = 0.65;
- 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 37 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aOtherAxisScale, $aStrokeLabels = true)
{
if ($this->hide) {
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 _StrokeTTF
has 139 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $debug = false)
{
// Setup default inter line margin for paragraphs to be
// 3% of the font height.
$ConstLineSpacing = 0.03;
File HandDigits.php
has 396 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
File LinePlot.php
has 395 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method StrokeTitles
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeTitles()
{
$margin = 3;
if ($this->titlebackground) {
Function StrokeDays
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeDays($aYCoord, $getHeight = false)
{
$img = $this->iImg;
$daywidth = $this->GetDayWidth();
$xt = $img->left_margin + $this->iLabelWidth;
- 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 Legend.php
has 389 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
WindrosePlot
has 40 functions (exceeds 20 allowed). Consider refactoring. Open
class WindrosePlot
{
private $iAntiAlias = true;
private $iData = [];
public $iX = 0.5;
Method StrokeFrameBackground
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeFrameBackground()
{
if ($this->background_image != '' && $this->background_cflag != '') {
Util\JpGraphError::RaiseL(25040); //('It is not possible to specify both a background image and a background country flag.');
}
Function Stroke
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$n = $this->numpoints;
if ($this->center) {
--$n;
- 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 IntAutoScale
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function IntAutoScale($img, $min, $max, $maxsteps, $majend = true)
{
// Make sure limits are integers
$min = floor($min);
$max = ceil($max);
- 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 DoDateAutoScale
has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring. Open
public function DoDateAutoScale($aStartTime, $aEndTime, $aDensity = 0, $aAdjust = true)
{
// Format of array
// array ( Decision point, array( array( Major-scale-step-array ),
// array( Minor-scale-step-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 _StrokeFreeRose
has 130 lines of code (exceeds 25 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) {
Function Stroke
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aX = null, $aY = null)
{
if ($aX !== null && $aY !== null) {
$this->iXPos = $aX;
$this->iYPos = $aY;
- 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 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aScale)
{
$factory = new Graph\RectPatternFactory();
$prect = $factory->Create($this->iPattern, $this->iPatternColor);
$prect->SetDensity($this->iPatternDensity);
Function StrokeHours
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeHours($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
Function _StrokeTicks
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function _StrokeTicks($aImg, $aScale, $aPos)
{
$hor = $aScale->type == 'x';
$aImg->SetLineWeight($this->weight);
- 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 120 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
/*
* File: diam_red.png
*/
Function Stroke
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel)
{
$start = $aScale->GetMinVal();
$limit = $aScale->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"