Showing 380 of 1,093 total issues
WeatherMapCactiManagementPlugin
has 49 functions (exceeds 20 allowed). Consider refactoring. Open
class WeatherMapCactiManagementPlugin extends UIBase
{
public $cactiBasePath;
/** @var MapManager $manager */
Function weathermap_poller_output
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
function weathermap_poller_output($rrdUpdateArray)
{
global $config;
$pdo = weathermap_get_pdo();
- 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 readFromRealRRDtool
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
private function readFromRealRRDtool($rrdfile, $cf, $start, $end, $dsnames, &$map, &$item)
{
MapUtility::debug("RRD ReadData: traditional style\n");
// we get the last 800 seconds of data - this might be 1 or 2 lines, depending on when in 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
File Legend.php
has 433 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Weathermap\Core;
/**
File cacti88-plugin-hooks.php
has 429 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
function weathermap_setup_table()
{
$dbversion = \read_config_option('weathermap_db_version');
Function calculateImagemap
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function calculateImagemap()
{
MapUtility::debug("Trace: calculateImagemap()\n");
// loop through everything. Figure out along the way if it's a node or a link
- 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 readData
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function readData($targetString, &$map, &$mapItem)
{
$this->data[IN] = null;
$this->data[OUT] = 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 readData
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
public function readData($targetString, &$map, &$mapItem)
{
$this->data[IN] = null;
$this->data[OUT] = 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
File cacti10-plugin-hooks.php
has 418 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
function weathermap_setup_table()
{
$dbversion = \read_config_option('weathermap_db_version');
File RRDTool.php
has 414 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
// RRDtool datasource plugin.
// gauge:filename.rrd:ds_in:ds_out
// filename.rrd:ds_in:ds_out
// filename.rrd:ds_in:ds_out
Editor
has 43 functions (exceeds 20 allowed). Consider refactoring. Open
class Editor
{
/** @var Map $map */
public $map;
/** @var string $mapFileName */
Function preRender
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
public function preRender(&$map)
{
if (!$this->drawable) {
MapUtility::debug('Skipping undrawable %s', $this);
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 preRender
has 141 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function preRender(&$map)
{
if (!$this->drawable) {
MapUtility::debug('Skipping undrawable %s', $this);
return;
File MapManagerTest.php
has 397 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace Weathermap\Tests;
require_once dirname(__FILE__) . '/../../all.php';
Method getConfig
has 137 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function getConfig()
{
if ($this->configOverride != '') {
return $this->configOverride . "\n";
}
File EditorTest.php
has 393 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
//
//require_once dirname(__FILE__) . '/../lib/all.php';
//require_once dirname(__FILE__) . '/../lib/Editor.php';
//include_once dirname(__FILE__) . "/WMTestSupport.php";
Function getConfig
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public function getConfig()
{
if ($this->configOverride != '') {
return $this->configOverride . "\n";
}
- 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 selfValidate
has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring. Open
public function selfValidate()
{
$classes = array(
'GLOBAL' => 'Weathermap\\Core\\Map',
'LINK' => 'Weathermap\\Core\\MapLink',
- 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 readData
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
public function readData($targetString, &$map, &$mapItem)
{
$this->data[IN] = null;
$this->data[OUT] = null;
$dsnames = array(IN => "traffic_in", OUT => "traffic_out");
- 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 maplist
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
protected function maplist()
{
\html_start_box(
__('Weathermaps'),
'100%',
- 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"