Showing 380 of 1,093 total issues
Method readFromPollerOutput
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
private function readFromPollerOutput($rrdfile, $cf, $start, $end, $dsnames, &$map, &$item)
Method imageFilledRoundedRectangle
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static function imageFilledRoundedRectangle($imageRef, $left, $top, $right, $bottom, $radius, $color)
Function getBySubstring
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function getBySubstring($nameFilter, $reverseOrder = false)
{
$result = array();
foreach ($this->shapes as $shape) {
- 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 tidySimpleDimension
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function tidySimpleDimension($boundingBoxA, $boundingBoxB, $nodeA, $nodeB, $simpleIndex, $simpleCoordinate)
Method drawImageString
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function drawImageString($gdImage, $x, $y, $string, $colour, $angle = 0)
Method getSNMPData
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
private function getSNMPData($host, $params, $oids, &$item, $timeout, $retries)
Function readConfigLines
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function readConfigLines($inputLines)
{
MapUtility::debug("in readConfigLines\n");
foreach ($inputLines as $buffer) {
- 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 __construct
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function __construct($lowValue, $highValue, $lowColour, $highColour = null, $tag = '', $label = '')
Method drawImageString
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function drawImageString($gdImage, $x, $y, $string, $colour, $angle = 0)
Method init
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public function init(&$link, $controlPoints, $widths, $directions = 2, $splitPosition = 50, $arrowStyle = 'classic')
Function updateMapProperties
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function updateMapProperties($params)
{
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 show_node
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function show_node(name) {
mapmode('existing');
hide_all_dialogs();
- 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 dispatchRequest
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function dispatchRequest($action, $request, $appObject)
{
if (!array_key_exists($action, $this->commands)) {
if (array_key_exists(":: DEFAULT ::", $this->commands)) {
$action = ":: DEFAULT ::";
- 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 drawMap
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
$imageFileName = '',
$thumbnailFileName = '',
$thumbnailMaxSize = 250,
$includeNodes = true,
$showVIAOverlay = false,
Function findScaleHit
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function findScaleHit($value)
{
$tag = '';
$smallestMatchColour = null;
$smallestMatchSize = 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 hitTest
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function hitTest($x, $y)
{
$c = false;
// do the easy bounding-box test first.
if (($x < $this->minx) || ($x > $this->maxx) || ($y < $this->miny) || ($y > $this->maxy)) {
- 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 render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
render() {
let contents = null;
if (this.state.loaded) {
- 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 dataSelected
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function dataSelected(event) {
var newlocation;
var data_id = $(this).data("source-id");
var path = $(this).data("path");
- 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 drawArtificialIcon
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function drawArtificialIcon(&$map, $labelColour)
{
MapUtility::debug('Artificial Icon type ' . $this->iconfile . " for $this->name\n");
// this is an artificial icon - we don't load a file for it
- 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 ping
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private function ping(&$item, $targetAddress, $pingCount)
{
if (!is_executable($this->fpingCommand)) {
MapUtility::warn("FPing ReadData: Can't find fping executable. Check path at line 36 of FPing");
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"