Showing 6,805 of 6,805 total issues
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) {
IconPlot
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class IconPlot
{
public $iX = 0;
public $iY = 0;
public $iScale = 1.0;
PlotMark
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class PlotMark
{
public $title;
public $show = true;
public $type;
RotImage
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class RotImage extends Image
{
public $a = 0;
public $dx = 0;
public $dy = 0;
Method _Stroke
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _Stroke($aImg, $x = null, $y = null, $aReturnWidthHeight = false)
{
if ($this->iFile != '' && $this->iCountryFlag != '') {
Util\JpGraphError::RaiseL(8003); //('It is not possible to specify both an image file and a country flag for the same icon.');
}
Method imageSmoothCircle
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function imageSmoothCircle(&$img, $cx, $cy, $cr, $color)
{
$ir = $cr;
$ix = 0;
$iy = $ir;
File RadarGraph.php
has 255 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Function GetTextWidth
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function GetTextWidth($txt, $angle = 0)
{
$tmp = preg_split('/\n/', $txt);
$n = safe_count($tmp);
if ($this->font_family <= FF_FONT2 + 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 GetColWidth
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function GetColWidth($aImg, $aMargin = 0)
{
$aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize);
if (is_array($this->iText)) {
$n = safe_count($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 StrokeAxis
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeAxis($aStrokeLabels = true)
{
if ($aStrokeLabels) {
$this->StrokeAxisLabelBackground();
}
- 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 GetCSIMareas
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
public function GetCSIMareas()
{
if (!$this->iHasStroked) {
$this->Stroke(_CSIM_SPECIALFILE);
}
- 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 AdjDate
has 51 lines of code (exceeds 25 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);
Method FilledFlatPolygon
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function FilledFlatPolygon($pts, $from_color, $to_color)
{
if (safe_count($pts) == 0) {
return;
}
Method doYearly
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function doYearly($aType, $aMinor = false)
{
$i = 0;
$j = 0;
$m = self::$startmonth;