Showing 706 of 6,805 total issues
Function SetAlign
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function SetAlign($aR1HAlign = null, $aC1VAlign = null, $aR2 = null, $aC2 = null, $aHArg = null, $aVArg = 'center')
{
if ($aC1VAlign !== null && $aR2 !== null && $aC2 !== null && $aHArg !== null) {
$this->_chkR($aR1HAlign);
$this->_chkC($aC1VAlign);
- 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 ApplyPlot
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'BarPlot':
$plot->Clear();
- 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 ApplyPlot
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function ApplyPlot($plot)
{
switch (get_class($plot)) {
case 'GroupBarPlot':
foreach ($plot->plots as $_plot) {
- 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 AutoScale
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function AutoScale($aRadius, $aMinDist = 30)
{
if ($this->iManualScale) {
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 SetTickDensity
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function SetTickDensity($aYDensity = TICKD_NORMAL, $aXDensity = TICKD_NORMAL)
{
$this->xtick_factor = 30;
$this->ytick_factor = 25;
switch ($aYDensity) {
- 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 IntCalcTicks
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function IntCalcTicks($maxsteps, $min, $max, $a, $majend = true)
{
$diff = $max - $min;
if ($diff == 0) {
Util\JpGraphError::RaiseL(25075); //('Can\'t automatically determine ticks since min==max.');
- 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 GetLinesXMinMax
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function GetLinesXMinMax($aLines)
{
$n = safe_count($aLines);
if ($n == 0) {
return false;
- 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 __construct
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($aWidth = 300, $aHeight = 200, $aCachedName = '', $aTimeout = 0, $aInline = true)
{
$this->gDateLocale = new Util\DateLocale();
$this->gJpgDateLocale = new Util\DateLocale();
if (!is_numeric($aWidth) || !is_numeric($aHeight)) {
- 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 10 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aFileName = '')
{
// Find out the necessary size for the container image
$w = 0;
$h = 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 Stroke
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aScale)
{
if (!$this->iShow) {
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
Method Max
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Max()
{
if (isset($this->coords[1])) {
$x = $this->coords[1];
} else {
Method Min
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Min()
{
if (isset($this->coords[1])) {
$x = $this->coords[1];
} else {
Method Stroke
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
// Remeber base color and size
$bc = $this->arrow->iColor;
$bs = $this->arrow->iSize;
Method GetColArray
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetColArray($from_color, $to_color, $arr_size, &$colors, $numcols = 100)
{
if ($arr_size == 0) {
return;
}
Method FilledRectangle2
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function FilledRectangle2($xl, $yu, $xr, $yl, $color1, $color2, $style = 1)
{
// Fill a rectangle with lines of two colors
if ($style === 1) {
// Horizontal stripe
Method Stroke
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke()
{
$n = strlen($this->iData);
if ($n == 0) {
return false;
Method SetupGraph
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
/*
$img = $graph->img;
Method GetTicksFromMinMax
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function GetTicksFromMinMax($aMin, $aMax, $aType, $aMinor = false, $aEndPoints = false)
{
self::$starthour = date('G', $aMin);
self::$startmonth = date('n', $aMin);
self::$startday = date('j', $aMin);
Method GetHeaderHeight
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetHeaderHeight()
{
$img = $this->iImg;
$height = 1;
if ($this->minute->iShowLabels) {
Method getHeight
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getHeight($aImg)
{
$scaling = 1; //$this->iAntiAlias ? 2 : 1 ;
if ($this->iSize > 0 && $this->iSize < 1) {
$this->iSize *= min($aImg->width, $aImg->height);