Showing 706 of 6,805 total issues
Method FilledRectangle
has 247 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function FilledRectangle($xl, $yt, $xr, $yb, $from_color, $to_color, $style = 1)
{
$this->img->SetLineWeight(1);
switch ($style) {
case GRAD_VER:
File RGB.php
has 555 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
File RGB.php
has 551 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method _imageSmoothArcDrawSegment
has 227 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _imageSmoothArcDrawSegment(&$img, $cx, $cy, $a, $b, $aaAngleX, $aaAngleY, $color, $start, $stop, $seg)
{
$fillColor = imagecolorexactalpha($img, $color[0], $color[1], $color[2], $color[3]);
$xStart = abs($a * cos($start));
Method __construct
has 225 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
/*
* warning.png
*/
Method Stroke
has 224 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$idx = 0;
$numpoints = safe_count($this->coords[0]);
if (isset($this->coords[1])) {
Function StrokeConstrains
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeConstrains()
{
$n = safe_count($this->iObj);
// Stroke all constrains
- 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 222 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg)
{
// Constant
$fillBoxFrameWeight = 1;
GTextTable
has 60 functions (exceeds 20 allowed). Consider refactoring. Open
class GTextTable
{
public $iCells = [];
public $iSize = [0, 0]; // Need to be public since they are used by the cell
private $iWidth = 0;
Function Stroke
has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
// If the filename is the predefined value = '_csim_special_'
// we assume that the call to stroke only needs to do enough
// to correctly generate the CSIM maps.
- 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 __construct
has 197 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
self::$FONT_BASEPATH = getenv('JPGRAPH_FONT_BASEPATH') ?
getenv('JPGRAPH_FONT_BASEPATH') :
dirname(__DIR__) . '/fonts/';
Function Stroke
has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aScale)
{
$factory = new Graph\RectPatternFactory();
$prect = $factory->Create($this->iPattern, $this->iPatternColor);
$prect->SetDensity($this->iPatternDensity);
- 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 49 (exceeds 5 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);
- 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 StrokeTitles
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeTitles()
{
$margin = 3;
if ($this->titlebackground) {
- 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 AutoSize
has 186 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AutoSize()
{
if ($this->img->img == null) {
// The predefined left, right, top, bottom margins.
// Note that the top margin might incease depending on
Function FilledRectangle
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function FilledRectangle($xl, $yt, $xr, $yb, $from_color, $to_color, $style = 1)
{
$this->img->SetLineWeight(1);
switch ($style) {
case GRAD_VER:
- 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 _StrokeTTF
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
public function _StrokeTTF($x, $y, $txt, $dir, $paragraph_align, &$aBoundingBox, $debug = false)
{
// Setup default inter line margin for paragraphs to be
// 3% of the font height.
$ConstLineSpacing = 0.03;
- 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
File GTextTableCell.php
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
File ImgData_PushPins.php
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* JPGraph v4.0.3
*/
Method Stroke
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
// Fist make a sanity check that user has specified a scale
if (empty($this->yscale)) {
Util\JpGraphError::RaiseL(25031); //('You must specify what scale to use with a call to Graph::SetScale().');