Showing 706 of 6,805 total issues
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;
}
Method Stroke
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aX = null, $aY = null)
{
if ($aX !== null && $aY !== null) {
$this->iXPos = $aX;
$this->iYPos = $aY;
Method IndentedRectangle
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function IndentedRectangle($xt, $yt, $w, $h, $iw = 0, $ih = 0, $aCorner = 3, $aFillColor = '', $r = 4)
{
list($xt, $yt) = $this->scale->Translate($xt, $yt);
list($w, $h) = $this->scale->Translate($w, $h);
list($iw, $ih) = $this->scale->Translate($iw, $ih);
Function Stroke
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$ymin = $yscale->scale_abs[0];
if ($yscale->scale[0] < 0) {
$yzero = $yscale->Translate(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 Legend
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function Legend($graph)
{
$colors = array_keys($graph->img->rgb->rgb_table);
sort($colors);
$ta = $this->themearr[$this->theme];
- 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 _StrokeBuiltinFont
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function _StrokeBuiltinFont($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $aDebug = false)
{
if (is_numeric($dir) && $dir != 90 && $dir != 0) {
Util\JpGraphError::RaiseL(25091);
}
- 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 imageSmoothArc
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function imageSmoothArc(&$img, $cx, $cy, $w, $h, $color, $start, $stop)
{
// Originally written from scratch by Ulrich Mierendorff, 06/2006
// Rewritten and improved, 04/2007, 07/2007
// compared to old version:
- 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 Get
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function Get($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
{
global $__jpg_err_locale;
if (!isset($this->lt[$errnbr])) {
return 'Internal error: The specified error message (' . $errnbr . ') does not exist in the chosen locale (' . $__jpg_err_locale . ')';
- 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 GetWidth
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public function GetWidth($aImg, $aUseTabs = false, $aTabExtraMargin = 1.1)
{
$extra_margin = 4;
$aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize);
if (is_string($this->iText)) {
- 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 24 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, &$grid, $aPos, $aAxisAngle, $aScale, &$aMajPos, &$aMajLabel)
{
// Prepare to draw linear ticks
$maj_step_abs = abs($aScale->scale_factor * $this->major_step);
$min_step_abs = 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 StrokeBoxedText
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeBoxedText(
$x,
$y,
$txt,
$dir = 0,
Method Stroke
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aOtherAxisScale, $aStrokeLabels = true)
{
if ($this->hide) {
return;
}
Method Stroke
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$n = $this->numpoints;
if ($this->center) {
--$n;
Function Color
has a Cognitive Complexity of 23 (exceeds 5 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:
- 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"