Showing 706 of 6,805 total issues
Function tryHexConversion
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function tryHexConversion($aColor)
{
if (is_array($aColor)) {
if (safe_count($aColor) == 3) {
if (is_numeric($aColor[0]) && is_numeric($aColor[1]) && is_numeric($aColor[2])) {
- 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 StrokeLabels
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeLabels($aImg, $xc, $yc, $ri, $rr)
{
if ($this->iHideLabels) {
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 GetTextsYMinMax
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function GetTextsYMinMax($aY2 = false)
{
if ($aY2) {
$txts = $this->y2texts;
} else {
- 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 GetLinesYMinMax
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function GetLinesYMinMax($aLines)
{
if (is_null($aLines)) {
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 GetTextsXMinMax
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function GetTextsXMinMax($aY2 = false)
{
if ($aY2) {
$txts = $this->y2texts;
} else {
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
if ($this->texts != null) {
for ($i = 0; $i < safe_count($this->texts); ++$i) {
$this->texts[$i]->Stroke($this->img);
- 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 GetMaxLabelWidth
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function GetMaxLabelWidth()
{
$m = 10;
if ($this->iObj != null) {
$marg = $this->scale->actinfo->iLeftColMargin + $this->scale->actinfo->iRightColMargin;
- 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 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Max()
{
list($xmax) = $this->plots[0]->Max();
$nmax = 0;
for ($i = 0; $i < safe_count($this->plots); ++$i) {
Method Stroke
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$numpoints = safe_count($this->coords[0]) / 2;
$img->SetColor($this->color);
$img->SetLineWeight($this->weight);
Method Stroke
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $aaoption = 0)
{
// Stroke the pie but don't stroke values
$tmp = $this->value->show;
$this->value->show = false;
Method GetAutoTicks
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function GetAutoTicks($aMin, $aMax, $aMaxTicks = 10, $aMinor = false)
{
$diff = $aMax - $aMin;
$spd = 3600 * 24;
$spw = $spd * 7;
Method Set
has 31 lines of code (exceeds 25 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])) {
Method Calc
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Calc()
{
$this->icalculated = true;
$n = safe_count($this->ix);
Method CalcTicks
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function CalcTicks($maxsteps, $min, $max, $a, $b, $majend = true)
{
$diff = $max - $min;
if ($diff == 0) {
$ld = 0;
Method CheckCSIMCache
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function CheckCSIMCache($aCacheName, $aTimeOut = 60)
{
global $_SERVER;
if ($aCacheName == 'auto') {
Method Stroke
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aScale)
{
if (!$this->iShow) {
return;
}
Method _fileCheck
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _fileCheck($filename, &$ownFixtures = [], $debug = false)
{
if (\is_array($filename)) {
if (\array_key_exists('width', $filename)) {
$__width = $filename['width'];
Method StrokeBackgroundGrad
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeBackgroundGrad()
{
if ($this->bkg_gradtype < 0) {
return;
}
Method Create
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Create($aPattern, $aColor, $aWeight = 1)
{
switch ($aPattern) {
case BAND_RDIAG:
$obj = new RectPatternRDiag($aColor, $aWeight);
Method _normalizeTestGroup
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _normalizeTestGroup($filename, &$ownFixtures = [], $example_title = 'file_iterator', $debug = false, $attributes = [])
{
$filename_meaningful = \explode('ex', $filename)[0];
if ('file_iterator' === $example_title) {