Showing 706 of 6,805 total issues
Function Stroke
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public function Stroke($aStrokeFileName = '')
{
// If the filename is the predefined value = '_csim_special_'
// we assume that the call to stroke only needs to do enough
// to correctly generate the CSIM maps.
- 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 15 (exceeds 5 allowed). Consider refactoring. Open
public function Add($aObj)
{
if (is_array($aObj) && safe_count($aObj) > 0) {
$cl = $aObj[0];
} 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
Method Stroke
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $aVal, $x, $y)
{
if ($this->show) {
if ($this->negformat == '') {
$this->negformat = $this->format;
Method Get
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Get($errnbr, $a1 = null, $a2 = null, $a3 = null, $a4 = null, $a5 = null)
{
global $__jpg_err_locale;
if (!isset($this->lt[$errnbr])) {
return 'Internal error: The specified error message (' . $errnbr . ') does not exist in the chosen locale (' . $__jpg_err_locale . ')';
Method SetupGraph
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetupGraph($graph)
{
// graph
$graph->SetFrame(false);
$graph->SetMarginColor('white');
Method _doLabelFormat
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _doLabelFormat($aVal, $aIdx, $aNbrTicks)
{
// If precision hasn't been specified set it to a sensible value
if ($this->precision == -1) {
$t = log10($this->minor_step);
Method LineInterpolate
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function LineInterpolate(&$aData)
{
$n = safe_count($aData);
$i = 0;
Method GetCSIMareas
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetCSIMareas()
{
if (!$this->iHasStroked) {
$this->Stroke(_CSIM_SPECIALFILE);
}
Method StrokeFrame
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function StrokeFrame()
{
if (!$this->doframe) {
return;
}
Method Stroke
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $pos, $scale, $startangle)
{
$nbrpnts = safe_count($this->data);
$astep = 2 * M_PI / $nbrpnts;
$a = $startangle;
Method imageSmoothArc
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function imageSmoothArc(&$img, $cx, $cy, $w, $h, $color, $start, $stop)
{
// Originally written from scratch by Ulrich Mierendorff, 06/2006
// Rewritten and improved, 04/2007, 07/2007
// compared to old version:
Method Color
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Color($aColor)
{
if (is_string($aColor)) {
$matches = [];
// this regex will parse a color string and fill the $matches array as such:
Method Stroke
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function Stroke($img, $pos, $scale, $startangle)
{
$nbrpnts = safe_count($this->data);
$astep = 2 * M_PI / $nbrpnts;
$a = $startangle;
Method SetScale
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function SetScale($aAxisType, $aYMin = 1, $aYMax = 1, $aXMin = 1, $aXMax = 1)
{
$this->axtype = $aAxisType;
if ($aYMax < $aYMin || $aXMax < $aXMin) {
Method _StrokeAxisTitle
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _StrokeAxisTitle($pos, $aAxisAngle, $title)
{
$this->title->Set($title);
$marg = 6 + $this->title->margin;
$xt = round(($this->scale->world_abs_size + $marg) * cos($aAxisAngle) + $this->scale->scale_abs[0]);
Method _SetPatternHelper
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _SetPatternHelper($aPattern, &$aPatternValue, &$aDensity)
{
switch ($aPattern) {
case PATTERN_DIAG1:
$aPatternValue = 1;
Method GetWidth
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function GetWidth($aImg, $aUseTabs = false, $aTabExtraMargin = 1.1)
{
$extra_margin = 4;
$aImg->SetFont($this->iFFamily, $this->iFStyle, $this->iFSize);
if (is_string($this->iText)) {
Function PreStrokeAdjust
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function PreStrokeAdjust($graph)
{
parent::PreStrokeAdjust($graph);
// If we are using a log Y-scale we want the base to be at the
- 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 Max
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public function Max()
{
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"