Showing 6,805 of 6,805 total issues
Function FilledRectangle2
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function FilledRectangle2($xl, $yu, $xr, $yl, $color1, $color2, $style = 1)
{
// Fill a rectangle with lines of two colors
if ($style === 1) {
// Horizontal stripe
- 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 Linear
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function Linear(&$aData, $aIntFactor)
{
$step = pow(2, $aIntFactor - 1);
$orig_cols = safe_count($aData[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 MakeDirs
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function MakeDirs($aFile)
{
$dirs = [];
// In order to better work when open_basedir is enabled
// we do not create directories in the root path
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg)
{
list($dx, $dy) = $this->isizespec[$this->iSize];
$x = $this->ix;
$y = $this->iy;
- 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 StrokeNumber
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeNumber($aValStr, $aColor = 0, $aFileName = '')
{
if ($aColor < 0 || $aColor >= safe_count($this->iColorSchema)) {
$aColor = 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 SetImage
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function SetImage($aFileR1, $aScaleC1 = null, $aMixR2 = null, $aC2 = null, $aFile = null, $aScale = 1.0, $aMix = 100)
{
if ($aScaleC1 !== null && $aMixR2 !== null && $aC2 !== null && $aFile !== null) {
$this->_chkR($aArgR1);
$this->_chkC($aC1);
- 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 SetAlign
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function SetAlign($aR1HAlign = null, $aC1VAlign = null, $aR2 = null, $aC2 = null, $aHArg = null, $aVArg = 'center')
{
if ($aC1VAlign !== null && $aR2 !== null && $aC2 !== null && $aHArg !== null) {
$this->_chkR($aR1HAlign);
$this->_chkC($aC1VAlign);
- 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 ApplyPlot
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'BarPlot':
$plot->Clear();
- 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 ApplyPlot
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function AutoScale($aRadius, $aMinDist = 30)
{
if ($this->iManualScale) {
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 SetTickDensity
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function SetTickDensity($aYDensity = TICKD_NORMAL, $aXDensity = TICKD_NORMAL)
{
$this->xtick_factor = 30;
$this->ytick_factor = 25;
switch ($aYDensity) {
- 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 IntCalcTicks
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function IntCalcTicks($maxsteps, $min, $max, $a, $majend = true)
{
$diff = $max - $min;
if ($diff == 0) {
Util\JpGraphError::RaiseL(25075); //('Can\'t automatically determine ticks since min==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 GetLinesXMinMax
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function GetLinesXMinMax($aLines)
{
$n = safe_count($aLines);
if ($n == 0) {
return false;
- 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 __construct
has a Cognitive Complexity of 10 (exceeds 5 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)) {
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aFileName = '')
{
// Find out the necessary size for the container image
$w = 0;
$h = 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 Stroke
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aScale)
{
if (!$this->iShow) {
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
Method Max
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Max()
{
if (isset($this->coords[1])) {
$x = $this->coords[1];
} else {
Method Min
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Min()
{
if (isset($this->coords[1])) {
$x = $this->coords[1];
} else {
Method Stroke
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
// Remeber base color and size
$bc = $this->arrow->iColor;
$bs = $this->arrow->iSize;
Method GetColArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetColArray($from_color, $to_color, $arr_size, &$colors, $numcols = 100)
{
if ($arr_size == 0) {
return;
}