Showing 706 of 6,805 total issues
Method _TransVert3D
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _TransVert3D($aGdImg, $aHorizon = 100, $aSkewDist = 120, $aDir = SKEW3D_DOWN, $aMinSize = true, $aFillColor = '#FFFFFF', $aQuality = false, $aBorder = false, $aHorizonPos = 0.5)
{
// Parameter check
if ($aHorizonPos < 0 || $aHorizonPos > 1.0) {
Util\JpGraphError::RaiseL(9001);
Method doMonthly
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function doMonthly($aType, $aMinor = false)
{
$monthcount = 0;
$m = self::$startmonth;
$y = self::$startyear;
Method StrokeAxis
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeAxis($aStrokeLabels = true)
{
if ($aStrokeLabels) {
$this->StrokeAxisLabelBackground();
}
LinearScale
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class LinearScale
{
public $textscale = false; // Just a flag to let the Plot class find out if
// we are a textscale or not. This is a cludge since
// this information is available in Graph::axtype but
Method AddSliceToCSIM
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AddSliceToCSIM($i, $xc, $yc, $radius, $sa, $ea)
{
//Slice number, ellipse centre (x,y), radius, start angle, end angle
while ($sa > 2 * M_PI) {
$sa = $sa - 2 * M_PI;
Method AutoScale
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AutoScale($img, $aStartTime, $aEndTime, $aNumSteps, $_adummy = false)
{
// We need to have one dummy argument to make the signature of AutoScale()
// identical to LinearScale::AutoScale
if ($aStartTime == $aEndTime) {
Method getIsobars
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getIsobars()
{
$this->adjustDataPointValues();
for ($isobar = 0; $isobar < $this->nbrIsobars; ++$isobar) {
Method _TransHor3D
has 61 lines of code (exceeds 25 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);
Function FilledFlatPolygon
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function FilledFlatPolygon($pts, $from_color, $to_color)
{
if (safe_count($pts) == 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 StrokeBoxedText
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeBoxedText(
$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 StrokeVGrid
has a Cognitive Complexity of 18 (exceeds 5 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.
- 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 FromCSV2
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function FromCSV2($aFile, &$aData, $aOptions = [])
{
$aDefaults = [
'separator' => ',',
'enclosure' => chr(34),
- 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 StrokeHGrid
has a Cognitive Complexity of 18 (exceeds 5 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.
- 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 StrokeWeeks
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeWeeks($aYCoord, $getHeight = false)
{
if ($this->week->iShowLabels) {
$img = $this->iImg;
$yt = $aYCoord + $img->top_margin;
- 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 AdjustMarginsForTitles
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function AdjustMarginsForTitles()
{
$totrequired =
($this->title->t != ''
? $this->title->GetTextHeight($this->img) + $this->title->margin + 5 * SUPERSAMPLING_SCALE
- 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 StrokeCSIM
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeCSIM($aScriptName = 'auto', $aCSIMName = '', $aBorder = 0)
{
if ($aCSIMName == '') {
// create a random map name
srand((int) (microtime() * 1000000));
- 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 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aFileName = '')
{
// Find out the necessary size for the container image
$w = 0;
$h = 0;
GanttGraph
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class GanttGraph extends Graph
{
public $scale; // Public accessible
public $hgrid;
private $iObj = []; // Gantt objects
Method __construct
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function __construct()
{
/*
* File: bullets_balls_red_013.png
*/
Method StrokeAxisLabelBackground
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeAxisLabelBackground()
{
// Types
// 0 = No background
// 1 = Only X-labels, length of axis