Showing 706 of 6,805 total issues
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;
Method DoPattern
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DoPattern($aImg)
{
// "Fake" a nice 3D grid-effect.
$x0 = $this->rect->x + $this->rect->w / 2;
$y0 = $this->rect->y;
Consider simplifying this complex logical expression. Open
if (($ext == 'jpg' && !($supported & IMG_JPG)) ||
($ext == 'gif' && !($supported & IMG_GIF)) ||
($ext == 'png' && !($supported & IMG_PNG)) ||
($ext == 'bmp' && !($supported & IMG_WBMP)) ||
($ext == 'xpm' && !($supported & IMG_XPM))) {
Method StrokeLabels
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeLabels($label, $img, $a, $xp, $yp, $z)
{
$this->value->halign = 'left';
$this->value->valign = 'top';
Method AddSliceToCSIM
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea)
{
//Slice number, ellipse centre (x,y), height, width, start angle, end angle
while ($sa > 2 * M_PI) {
$sa = $sa - 2 * M_PI;
Method _StrokeBuiltinFont
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _StrokeBuiltinFont($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $aDebug = false)
{
if (is_numeric($dir) && $dir != 90 && $dir != 0) {
Util\JpGraphError::RaiseL(25091);
}
Method imagettfbbox_fixed
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function imagettfbbox_fixed($size, $angle, $fontfile, $text)
{
if (!USE_LIBRARY_IMAGETTFBBOX) {
$bbox = @imagettfbbox($size, $angle, $fontfile, $text);
if ($bbox === false) {
Method Stroke
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$ymin = $yscale->scale_abs[0];
if ($yscale->scale[0] < 0) {
$yzero = $yscale->Translate(0);