Showing 706 of 6,805 total issues
Function DoStroke
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function DoStroke($aTicksPos, $aType, $aColor, $aWeight)
{
$nbrgrids = safe_count($aTicksPos);
if (!$this->show || $nbrgrids === 0) {
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
File prod.inc.php
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method Stroke
has 116 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.
Function Stroke
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $aVal, $x, $y)
{
if ($this->show) {
if ($this->negformat == '') {
$this->negformat = $this->format;
- 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 AccBarPlot.php
has 355 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method Stroke
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $scale, $pos)
{
$start = $scale->GetMinVal();
$limit = $scale->GetMaxVal();
$nextMajor = 10 * $start;
Method Stroke
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aGraph)
{
$aImg = $aGraph->img;
if ($this->iX > 0 && $this->iX < 1) {
Function Set
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function Set($aArg1, $aArg2 = null, $aArg3 = null)
{
if ($aArg2 === null && $aArg3 === null) {
if (is_array($aArg1)) {
if (is_array($aArg1[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 AdjTime
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
public function AdjTime($aTime, $aRound = 0, $aHourType = false, $aMinType = false, $aSecType = false)
{
$y = (int) date('Y', $aTime);
$m = (int) date('m', $aTime);
$d = (int) date('d', $aTime);
- 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 Gradient.php
has 349 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
File en.inc.php
has 349 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
File de.inc.php
has 349 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
File DateScale.php
has 348 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method SetAutoScaleAngle
has 108 lines of code (exceeds 25 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)) {
Method StrokeBoxedText2
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeBoxedText2(
$x,
$y,
$txt,
$dir = 0,
Method Stroke
has 108 lines of code (exceeds 25 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
Method Stroke
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
// Start by adjusting the margin so that potential titles will fit.
$this->AdjustMarginsForTitles();
Method StrokeDays
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeDays($aYCoord, $getHeight = false)
{
$img = $this->iImg;
$daywidth = $this->GetDayWidth();
$xt = $img->left_margin + $this->iLabelWidth;
Method Init
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function Init()
{
// Setup limits for color indications
$lowx = $this->iXMin;
$highx = $this->iXMax;
Function Stroke
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aGraph)
{
$aImg = $aGraph->img;
if ($this->iX > 0 && $this->iX < 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"