Showing 706 of 6,805 total issues
Method ApplyPlot
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method GetTextWidth
has 32 lines of code (exceeds 25 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) {
Method ApplyPlot
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method ApplyPlot
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method StrokeVGrid
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeVGrid($aImg, $aX, $aY, $aWidth, $aHeight, $aDir = 1)
{
// Left or right grid line
// For the right we increase the X-pos and for the right we decrease it. This is
// determined by the direction argument.
Method StrokeHGrid
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeHGrid($aImg, $aX, $aY, $aWidth, $aHeight, $aDir = 1)
{
// Top or bottom grid line
// For the left we increase the X-pos and for the right we decrease it. This is
// determined by the direction argument.
Method ApplyPlot
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method ApplyPlot
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method ApplyPlot
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
Method __construct
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct($aImg)
{
$this->iImg = $aImg;
$this->iDateLocale = new Util\DateLocale();
Method Stroke
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($pos, $aAxisAngle, &$grid, $title, $lf)
{
$this->img->SetColor($this->color);
// Determine end points for the axis
Method Stroke
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
if ($this->texts != null) {
for ($i = 0; $i < safe_count($this->texts); ++$i) {
$this->texts[$i]->Stroke($this->img);
Function _SetPatternHelper
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function _SetPatternHelper($aPattern, &$aPatternValue, &$aDensity)
{
switch ($aPattern) {
case PATTERN_DIAG1:
$aPatternValue = 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
Method Pie3DSlice
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function Pie3DSlice($img, $xc, $yc, $w, $h, $sa, $ea, $z, $fillcolor, $shadow = 0.65)
Function Polygon
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function Polygon($p, $closed = false, $fast = false)
{
if ($this->line_weight <= 0) {
return;
}
- 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 tryHexConversion
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static function tryHexConversion($aColor)
{
if (is_array($aColor)) {
if (safe_count($aColor) == 3) {
if (is_numeric($aColor[0]) && is_numeric($aColor[1]) && is_numeric($aColor[2])) {
- 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 CopyMerge
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function CopyMerge($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1, $aMix = 100)
Method CopyCanvasH
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function CopyCanvasH($aToHdl, $aFromHdl, $aToX, $aToY, $aFromX, $aFromY, $aWidth, $aHeight, $aw = -1, $ah = -1)
Function FastStroke
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function FastStroke($img, $xscale, $yscale, $aStartPoint = 0, $exist_x = true)
{
// An optimized stroke for many data points with no extra
// features but 60% faster. You can't have values or line styles, or null
// values in plots.
- 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 CopyMerge
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
public function CopyMerge($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1, $aMix = 100)