Showing 706 of 6,805 total issues
Function _TransHor3D
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function _TransHor3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_LEFT, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5)
{
$w = imagesx($aGdImg);
$h = imagesy($aGdImg);
- 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 StrokeBoxedText2
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeBoxedText2(
$x,
$y,
$txt,
$dir = 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 AdjDate
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
public function AdjDate($aTime, $aRound = 0, $aYearType = false, $aMonthType = false, $aDayType = false)
{
$y = (int) date('Y', $aTime);
$m = (int) date('m', $aTime);
$d = (int) date('d', $aTime);
- 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 Stroke
has 80 lines of code (exceeds 25 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
Method StrokeHours
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeHours($aYCoord, $getHeight = false)
{
$img = $this->iImg;
$xt = $img->left_margin + $this->iLabelWidth;
$yt = $aYCoord + $img->top_margin;
GTextTableCell
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class GTextTableCell
{
public $iColSpan = 1;
public $iRowSpan = 1;
public $iMarginLeft = 5;
Legend
has 27 functions (exceeds 20 allowed). Consider refactoring. Open
class Legend
{
public $txtcol = [];
public $font_family = FF_DEFAULT;
public $font_style = FS_NORMAL;
File Text.php
has 297 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method AutoScale
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AutoScale($img, $min, $max, $maxsteps, $majend = true)
{
if (!is_numeric($min) || !is_numeric($max)) {
Util\JpGraphError::Raise(25044);
}
Function StrokeAxisLabelBackground
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeAxisLabelBackground()
{
// Types
// 0 = No background
// 1 = Only X-labels, length of axis
- 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 StrokeTitle
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeTitle($image, $w, $h)
{
// Stroke title
if ($this->title->t !== '') {
$margin = 3;
- 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 Stroke
has 77 lines of code (exceeds 25 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);
File TTF.php
has 293 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
File MGraph.php
has 292 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method Raise
has 75 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Raise($aMsg, $aHalt = true)
{
$img_iconerror =
'iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAMAAAC7IEhfAAAAaV' .
'BMVEX//////2Xy8mLl5V/Z2VvMzFi/v1WyslKlpU+ZmUyMjEh/' .
Method StrokeGrid
has 75 lines of code (exceeds 25 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);
Method PutAndStream
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function PutAndStream($aImage, $aCacheFileName, $aInline, $aStrokeFileName)
{
// Check if we should always stroke the image to a file
if (_FORCE_IMGTOFILE) {
$aStrokeFileName = _FORCE_IMGDIR . Util\Helper::GenImgName();
Method DoStroke
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DoStroke($aTicksPos, $aType, $aColor, $aWeight)
{
$nbrgrids = safe_count($aTicksPos);
if (!$this->show || $nbrgrids === 0) {
return;
Method Stroke
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $x = null, $y = null)
{
if (is_numeric($x)) {
$this->x = round($x);
}
Method Stroke
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $ax = -1, $ay = -1)
{
// To position the super script correctly we need different
// cases to handle the alignmewnt specified since that will
// determine how we can interpret the x,y coordinates