Showing 706 of 6,805 total issues
Method Pie3D
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
$aaoption,
$img,
$data,
$colors,
$xc,
Method Stroke
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($aImg, $aScale)
{
// Put the mark in the middle at the middle of the day
$d = $aScale->NormalizeDate($this->iStart) + SECPERDAY / 2;
$x = $aScale->TranslateDate($d);
Method doWeekly
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function doWeekly($aType, $aMinor = false)
{
$hpd = 3600 * 24;
$hpw = 3600 * 24 * 7;
// Find out week number of min date
Method DoPattern
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DoPattern($aImg)
{
// --------------------
// |\ \ \ \ \ |
// | \ \ \ \ \|
Function CalculateColors
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function CalculateColors()
{
if ($this->highcontrast) {
if ($this->highcontrastbw) {
for ($ib = 0; $ib < $this->nbrIsobars; ++$ib) {
- 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 SetPattern
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function SetPattern($aPattern, $aColor = 'black')
{
if (is_array($aPattern)) {
$n = safe_count($aPattern);
$this->iPattern = [];
- 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 AddSliceToCSIM
has a Cognitive Complexity of 13 (exceeds 5 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;
- 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 13 (exceeds 5 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.');
}
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $xscale, $yscale)
{
$numpoints = safe_count($this->coords[0]) / 2;
$img->SetColor($this->color);
$img->SetLineWeight($this->weight);
- 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 doWeekly
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function doWeekly($aType, $aMinor = false)
{
$hpd = 3600 * 24;
$hpw = 3600 * 24 * 7;
// Find out week number of min date
- 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 imageSmoothCircle
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function imageSmoothCircle(&$img, $cx, $cy, $cr, $color)
{
$ir = $cr;
$ix = 0;
$iy = $ir;
- 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 imagettfbbox_fixed
has a Cognitive Complexity of 13 (exceeds 5 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) {
- 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 GetAutoTicks
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function GetAutoTicks($aMin, $aMax, $aMaxTicks = 10, $aMinor = false)
{
$diff = $aMax - $aMin;
$spd = 3600 * 24;
$spw = $spd * 7;
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aDummy1 = null, $aDummy2 = null)
{
if ($this->hide) {
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 SetFont
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function SetFont()
{
$numargs = func_num_args();
if ($numargs == 2 || $numargs == 3) {
$aFF = func_get_arg(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 CheckCSIMCache
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function CheckCSIMCache($aCacheName, $aTimeOut = 60)
{
global $_SERVER;
if ($aCacheName == 'auto') {
- 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 StrokeBands
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeBands($aDepth, $aCSIM)
{
// Stroke bands
if ($this->bands != null && !$aCSIM) {
for ($i = 0; $i < safe_count($this->bands); ++$i) {
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aImg, $aXLeft, $aYTop, $aXRight, $aYBottom, $aUseTextHeight = false)
{
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 Add3DSliceToCSIM
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Add3DSliceToCSIM($i, $xc, $yc, $height, $width, $thick, $sa, $ea)
{
//Slice number, ellipse centre (x,y), height, width, start angle, end angle
$sa *= M_PI / 180;
Method StrokeFullSliceFrame
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeFullSliceFrame($img, $xc, $yc, $sa, $ea, $w, $h, $z, $edgecolor, $exploderadius, $fulledge)
{
$step = 0.02;
if ($exploderadius > 0) {