Showing 6,805 of 6,805 total issues
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"
Further reading
Function Stroke
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $ax = -1, $ay = -1)
{
// To position the super script correctly we need different
// cases to handle the alignmewnt specified since that will
// determine how we can interpret the x,y coordinates
- 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 29 (exceeds 5 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)) {
- 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 AutoScale
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
public function AutoScale($img, $aStartTime, $aEndTime, $aNumSteps, $_adummy = false)
{
// We need to have one dummy argument to make the signature of AutoScale()
// identical to LinearScale::AutoScale
if ($aStartTime == $aEndTime) {
- 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 FlagImages.php
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method StrokeLabels
has 105 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeLabels($aPos, $aMinor = false, $aAbsLabel = false)
{
if (is_array($this->label_color) && safe_count($this->label_color) > 3) {
$this->ticks_label_colors = $this->label_color;
$this->img->SetColor($this->label_color[0]);
Function doYearly
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public static function doYearly($aType, $aMinor = false)
{
$i = 0;
$j = 0;
$m = self::$startmonth;
- 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 AutoScale
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
public function AutoScale($img, $min, $max, $maxsteps, $majend = true)
{
if (!is_numeric($min) || !is_numeric($max)) {
Util\JpGraphError::Raise(25044);
}
- 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"