Showing 706 of 6,805 total issues
Function Min
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function Min()
{
if (isset($this->coords[1])) {
$x = $this->coords[1];
} else {
- 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 GetBBoxTTF
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function GetBBoxTTF($aTxt, $aAngle = 0)
{
// Normalize the bounding box to become a minimum
// enscribing rectangle
- 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 CopyMerge
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function CopyMerge($fromImg, $toX, $toY, $fromX, $fromY, $toWidth, $toHeight, $fromWidth = -1, $fromHeight = -1, $aMix = 100)
{
if ($aMix == 100) {
$this->CopyCanvasH(
$this->img,
- 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 GetIdxByName
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function GetIdxByName($aName, &$outFullName)
{
if (is_integer($aName)) {
$idx = $this->GetIdxByOrdinal($aName, $outFullName);
- 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 MergeCells
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function MergeCells($aR1, $aC1, $aR2, $aC2, $aHAlign = 'center', $aVAlign = 'center')
{
if ($aR1 > $aR2 || $aC1 > $aC2) {
Util\JpGraphError::RaiseL(27004);
//('GTextTable::MergeCells(). Specified cell range to be merged is not valid.');
- 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 doAutoScaleYAxis
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function doAutoScaleYAxis()
{
//Check if we should autoscale y-axis
if (!$this->yscale->IsSpecified() && safe_count($this->plots) > 0) {
list($min, $max) = $this->GetPlotsYMinMax($this->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
Function SetScale
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function SetScale($aAxisType, $aYMin = 1, $aYMax = 1, $aXMin = 1, $aXMax = 1)
{
$this->axtype = $aAxisType;
if ($aYMax < $aYMin || $aXMax < $aXMin) {
- 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 StrokeFrameBackground
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function StrokeFrameBackground()
{
if ($this->background_image != '' && $this->background_cflag != '') {
Util\JpGraphError::RaiseL(25040); //('It is not possible to specify both a background image and a background country flag.');
}
- 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 Add
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function Add($aPlot)
{
if ($aPlot == null) {
Util\JpGraphError::RaiseL(25010); //("Graph::Add() You tried to add a null plot to the graph.");
}
- 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 14 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($img, $pos, $scale, $startangle)
{
$nbrpnts = safe_count($this->data);
$astep = 2 * M_PI / $nbrpnts;
$a = $startangle;
- 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 Add
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function Add($aObject)
{
if (is_array($aObject) && safe_count($aObject) > 0) {
$cl = $aObject[0];
if (($cl instanceof Plot\IconPlot)) {
- 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 AdjPercentage
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function AdjPercentage($aData, $aPrec = 0)
{
$mul = 100;
if ($aPrec > 0 && $aPrec < 3) {
if ($aPrec == 1) {
Method Convert
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Convert($aTxt, $aFF)
{
if (LANGUAGE_GREEK) {
if (GREEK_FROM_WINDOWS) {
$unistring = LanguageConv::gr_win2uni($aTxt);
Method doDaily
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static function doDaily($aType, $aMinor = false)
{
$m = self::$startmonth;
$y = self::$startyear;
$d = self::$startday;
Method _StrokeTicks
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _StrokeTicks($aImg, $aScale, $aPos)
{
$hor = $aScale->type == 'x';
$aImg->SetLineWeight($this->weight);
Method StrokeLabels
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeLabels($aImg, $xc, $yc, $ri, $rr)
{
if ($this->iHideLabels) {
return;
}
Method StrokeTitle
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeTitle($image, $w, $h)
{
// Stroke title
if ($this->title->t !== '') {
$margin = 3;
Method SetImgFormat
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetImgFormat($aFormat, $aQuality = 75)
{
$this->quality = $aQuality;
$aFormat = strtolower($aFormat);
$tst = true;
Method StrokeCSIM
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeCSIM($aScriptName = 'auto', $aCSIMName = '', $aBorder = 0)
{
if ($aCSIMName == '') {
// create a random map name
srand((int) (microtime() * 1000000));
Method DoPattern
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function DoPattern($aImg)
{
// --------------------
// | / / / / /|
// |/ / / / / |