Showing 380 of 1,093 total issues
Function drawLegendHorizontal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function drawLegendHorizontal($keyWidth = 400)
{
$title = $this->keytitle;
- 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 drawViaOverlay
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function drawViaOverlay($imageRef, $overlayColor)
{
foreach ($this->links as $link) {
foreach ($link->viaList as $via) {
if (isset($via[2])) {
- 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 getMapTitle
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getMapTitle($fileName)
{
$title = "";
$fileHandle = fopen($fileName, "r");
if ($fileHandle) {
- 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 cloneNode
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function cloneNode($sourceNodeName, $targetName = "", $orFail = false)
{
if (!$this->isLoaded()) {
throw new WeathermapInternalFail("Map must be loaded before editing API called.");
}
- 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 getConfig
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getConfig()
{
assert(isset($this->owner));
$output = '';
- 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 setPropSub
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function setPropSub($which, $what, $where)
{
$count = 0;
foreach ($this->shapes as $shape) {
if (($where == '') || (strstr($shape->name, $where) != 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 handleSCALE
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function handleSCALE($fullcommand, $args, $matches)
{
// The default scale name is DEFAULT
if ($matches[1] == '') {
- 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 getConfigValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function getConfigValue($keyname)
{
if (isset($this->config[$keyname])) {
return array($this->config[$keyname], self::CONF_FOUND_DIRECT);
}
- 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 calculateScaleColours
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function calculateScaleColours()
{
$channels = $this->getChannelList();
$scale = $this->owner->getScale($this->usescale);
- 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 writeImageFile
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function writeImageFile($imageFileName, $imageRef)
{
$extension = strtolower(substr($imageFileName, -4, 4));
$types = array(
- 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 interpretNodeSpec
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function interpretNodeSpec($input)
{
$endOffset = 'C';
$nodeName = $input;
$xOffset = 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 setEndNodes
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function setEndNodes($node1, $node2)
{
if (null !== $node1 && null === $node2) {
throw new WeathermapInternalFail('PartiallyRealLink');
}
- 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 scaleImage
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
private function scaleImage($scaleWidth, $scaleHeight, $iconImageRef)
{
$iconWidth = imagesx($iconImageRef);
$iconHeight = imagesy($iconImageRef);
- 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 getTitleFromConfig
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static function getTitleFromConfig($filename, $defaultTitle = "")
{
$title = "";
$fileHandle = fopen($filename, "r");
- 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 handleMapSettingsSave
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public function handleMapSettingsSave(
$request,
$appObject
) {
$mapid = null;
- 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 previewConfig
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
protected function previewConfig(
$file
) {
chdir($this->configPath);
- 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
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return true;