Showing 706 of 6,805 total issues
Method Color
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Color($aColor)
{
if (is_string($aColor)) {
$matches = [];
// this regex will parse a color string and fill the $matches array as such:
Method __construct
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($aWidth = 300, $aHeight = 200, $aCachedName = '', $aTimeout = 0, $aInline = true)
{
$this->gDateLocale = new Util\DateLocale();
$this->gJpgDateLocale = new Util\DateLocale();
if (!is_numeric($aWidth) || !is_numeric($aHeight)) {
Function Stroke
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
// Remeber base color and size
$bc = $this->arrow->iColor;
$bs = $this->arrow->iSize;
- 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 Legend
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function Legend($graph)
{
if ($this->grad && $this->legend != '' && !$this->fill) {
$color = [$this->grad_fromcolor, $this->grad_tocolor];
// In order to differentiate between gradients and cooors specified as an Image\RGB triple
- 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 FixupIndexes
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function FixupIndexes($aDataArray, $num)
{
$ret = [];
$keys = array_keys($aDataArray);
foreach ($aDataArray as $idx => $data) {
- 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 Max
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function Max()
{
list($xmax) = $this->plots[0]->Max();
$nmax = 0;
for ($i = 0; $i < safe_count($this->plots); ++$i) {
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aXScale, $aYScale)
{
assert($this->prect != null);
if ($this->dir == HORIZONTAL) {
if ($this->min === 'min') {
- 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 StrokeFullSliceFrame
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeFullSliceFrame($img, $xc, $yc, $sa, $ea, $w, $h, $z, $edgecolor, $exploderadius, $fulledge)
{
$step = 0.02;
if ($exploderadius > 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 StyleLine
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function StyleLine($x1, $y1, $x2, $y2, $aStyle = '', $from_grid_class = false)
{
if ($this->line_weight <= 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
Function Stroke
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $x = null, $y = null)
{
if (is_numeric($x)) {
$this->x = round($x);
}
- 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 StrokeFrame
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeFrame()
{
if (!$this->doframe) {
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 GetURLArguments
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static function GetURLArguments($aAddRecursiveBlocker = false)
{
if ($aAddRecursiveBlocker) {
// This is a JPGRAPH internal defined that prevents
// us from recursively coming here again
- 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 AddLine
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function AddLine($aLine, $aToY2 = false)
{
if ($aLine == null) {
Util\JpGraphError::RaiseL(25015); //("Graph::AddLine() You tried to add a null line to the graph.");
}
- 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 doPrestrokeAdjustments
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function doPrestrokeAdjustments()
{
// Do any pre-stroke adjustment that is needed by the different plot types
// (i.e bar plots want's to add an offset to the x-labels etc)
for ($i = 0; $i < safe_count($this->plots); ++$i) {
- 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 AddText
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function AddText($aTxt, $aToY2 = false)
{
if ($aTxt == null) {
Util\JpGraphError::RaiseL(25014); //("Graph::AddText() You tried to add a null text to the graph.");
}
- 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 GetXMinMax
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function GetXMinMax()
{
list($min, $ymin) = $this->plots[0]->Min();
list($max, $ymax) = $this->plots[0]->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 AddBand
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function AddBand($aBand, $aToY2 = false)
{
if ($aBand == null) {
Util\JpGraphError::RaiseL(25016); //(" Graph::AddBand() You tried to add a null band to the graph.");
}
- 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 _doManualTickPos
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _doManualTickPos($aScale)
{
$n = safe_count($this->iManualTickPos);
$m = safe_count($this->iManualMinTickPos);
$doLbl = safe_count($this->iManualTickLabels) > 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 Init
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
private function Init()
{
// Setup limits for color indications
$lowx = $this->iXMin;
$highx = $this->iXMax;
- 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 _StrokeAxisTitle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function _StrokeAxisTitle($pos, $aAxisAngle, $title)
{
$this->title->Set($title);
$marg = 6 + $this->title->margin;
$xt = round(($this->scale->world_abs_size + $marg) * cos($aAxisAngle) + $this->scale->scale_abs[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"