Showing 706 of 6,805 total issues
Method Stroke
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aXLeft, $aYTop, $aXRight, $aYBottom, $aUseTextHeight = false)
{
if (!$this->iShow) {
return;
}
Method Legend
has 57 lines of code (exceeds 25 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
Method AdjustMarginsForTitles
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AdjustMarginsForTitles()
{
$totrequired =
($this->title->t != ''
? $this->title->GetTextHeight($this->img) + $this->title->margin + 5 * SUPERSAMPLING_SCALE
Method doAutoScaleYnAxis
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function doAutoScaleYnAxis()
{
if ($this->y2scale != null) {
if (!$this->y2scale->IsSpecified() && safe_count($this->y2plots) > 0) {
list($min, $max) = $this->GetPlotsYMinMax($this->y2plots);
Method Get
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function Get($aSymb, $aCapital = false)
{
$iSymbols = [
/* Greek */
['alpha', '03B1', '0391'],
Method _doAutoTickPos
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _doAutoTickPos($aScale)
{
$maj_step_abs = $aScale->scale_factor * $this->major_step;
$min_step_abs = $aScale->scale_factor * $this->minor_step;
Function StrokeLabels
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeLabels($label, $img, $a, $xp, $yp, $z)
{
$this->value->halign = 'left';
$this->value->valign = 'top';
- 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 17 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aScale)
{
// Put the mark in the middle at the middle of the day
$d = $aScale->NormalizeDate($this->iStart) + SECPERDAY / 2;
$x = $aScale->TranslateDate($d);
- 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 AdjPercentage
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function AdjPercentage($aData, $aPrec = 0)
{
$mul = 100;
if ($aPrec > 0 && $aPrec < 3) {
if ($aPrec == 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 doDaily
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public static function doDaily($aType, $aMinor = false)
{
$m = self::$startmonth;
$y = self::$startyear;
$d = self::$startday;
- 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 StrokeYears
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeYears($aYCoord, $getHeight = false)
{
if ($this->year->iShowLabels) {
$img = $this->iImg;
$yt = $aYCoord + $img->top_margin;
- 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 17 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($pos, $dummy = true)
{
$this->img->SetLineWeight($this->weight);
$this->img->SetColor($this->color);
$this->img->SetFont($this->font_family, $this->font_style, $this->font_size);
- 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 Legend
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Legend($graph)
{
$colors = array_keys($graph->img->rgb->rgb_table);
sort($colors);
$ta = $this->themearr[$this->theme];
Method DrawLine
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DrawLine($im, $x1, $y1, $x2, $y2, $weight, $color)
{
if ($weight == 1) {
return imageline($im, $x1, $y1, $x2, $y2, $color);
}
Method AdjustMarginsForGrid
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AdjustMarginsForGrid()
{
if ($this->iCol > 0) {
switch ($this->iGridStyle[0]) {
case TGRID_SINGLE:
Method Stroke
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aX, $aY)
{
if ($this->iShow) {
$aImg->SetColor($this->iColor);
$aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize);
Method FromCSV2
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function FromCSV2($aFile, &$aData, $aOptions = [])
{
$aDefaults = [
'separator' => ',',
'enclosure' => chr(34),
Method StrokeYears
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeYears($aYCoord, $getHeight = false)
{
if ($this->year->iShowLabels) {
$img = $this->iImg;
$yt = $aYCoord + $img->top_margin;
Method Stroke
has 56 lines of code (exceeds 25 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);
Method Stroke
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $scale)
{
// If coordinates are specifed as negative this means we should
// treat them as abolsute (pixels) coordinates
if ($this->ix > 0) {