Showing 6,805 of 6,805 total issues
Function CreateSimple
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function CreateSimple($data, $constrains = [], $progress = [])
{
$num = safe_count($data);
for ($i = 0; $i < $num; ++$i) {
switch ($data[$i][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
LineTest
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class LineTest extends \Codeception\Test\Unit
{
use Amenadiel\JpGraph\UnitTest\UnitTestTrait;
public static $fixTures = [];
Method Stroke
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aX, $aY, $aWidth, $aHeight)
{
// If this is a merged cell we only stroke if it is the parent cell.
// The parent cell holds the merged cell block
if ($this->iMerged && ($this->iRow != $this->iPRow || $this->iCol != $this->iPCol)) {
Method Stroke
has 97 lines of code (exceeds 25 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.
Method DoDateAutoScale
has 96 lines of code (exceeds 25 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 ),
PiePlot
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class PiePlot
{
public $posx = 0.5;
public $posy = 0.5;
public $is_using_plot_theme = false;
AxisPrototype
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class AxisPrototype
{
public $scale;
public $img;
public $hide = false;
Function _doAutoTickPos
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
public function _doAutoTickPos($aScale)
{
$maj_step_abs = $aScale->scale_factor * $this->major_step;
$min_step_abs = $aScale->scale_factor * $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
Method ImgData_Squares
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ImgData_Squares()
{
/*
*sq_lblue.png
*/
Method IntAutoScale
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function IntAutoScale($img, $min, $max, $maxsteps, $majend = true)
{
// Make sure limits are integers
$min = floor($min);
$max = ceil($max);
Method doAutoscaleXAxis
has 92 lines of code (exceeds 25 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;
Consider simplifying this complex logical expression. Open
if (($da <= 90 && ($a <= 90 && $ne > 90)) ||
(($da <= 180 && $da > 90) && (($a < 90 || $a >= 270) && $ne > 90))) {
$split = 90;
} elseif (($da <= 90 && ($a <= 270 && $ne > 270)) ||
(($da <= 180 && $da > 90) && ($a >= 90 && $a < 270 && ($a + $da) > 270))) {
Text
has 30 functions (exceeds 20 allowed). Consider refactoring. Open
class Text //extends Graph
{
public $t;
public $x = 0;
public $y = 0;
Function Stroke
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $aaoption = 0)
{
$n = safe_count($this->data);
// If user hasn't set the colors use the theme 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
Function _TransVert3D
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function _TransVert3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_DOWN, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5)
{
// Parameter check
if ($aHorizonPos < 0 || $aHorizonPos > 1.0) {
Util\JpGraphError::RaiseL(9001);
- 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 Convert
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function Convert($aTxt, $aFF)
{
if (LANGUAGE_GREEK) {
if (GREEK_FROM_WINDOWS) {
$unistring = LanguageConv::gr_win2uni($aTxt);
- 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 StrokeGrid
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeGrid($pos)
{
$x = round($this->img->left_margin + $this->img->plotwidth / 2);
$this->scale->ticks->Stroke($this->img, $this->scale, $pos);
- 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 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
/*
* File: bstar_green_001.png
*/
File DateScaleUtils.php
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method _StrokeLegend
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _StrokeLegend($aImg, $x, $y, $scaling = 1, $aReturnWidth = false)
{
if (!$this->legend->iShow) {
return 0;
}