Showing 380 of 1,093 total issues
Function writeDataFile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function writeDataFile($filename)
{
if ($filename == '') {
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
Function buildOverlibPositioning
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function buildOverlibPositioning($mapItem, $midX, $mapCenterX, $midY, $mapCenterY)
{
$left = '';
$above = '';
$imageExtraHTML = '';
- 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 handleNODE
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function handleNODE($fullcommand, $args, $matches)
{
$this->commitItem();
unset($this->currentObject);
- 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 getHintConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function getHintConfig($comparison)
{
$output = '';
foreach ($this->hints as $hintName => $hint) {
// all hints for DEFAULT node are for writing
- 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 sprintf
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function sprintf($format, $value, $kilo = 1000)
{
// if we get a null, it probably means no-data from the datasource plugin
// don't coerce that into a zero
if ($value === 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 imagecreatescaledfromfile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function imagecreatescaledfromfile($filename, $scaleWidth, $scaleHeight)
{
list($width, $height) = getimagesize($filename);
MapUtility::debug("Getting a (maybe cached) image for $filename at $scaleWidth x $scaleHeight\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 handleTEMPLATE
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function handleTEMPLATE($fullcommand, $args, $matches)
{
$templateName = $matches[1];
if (($this->currentType == 'NODE' && isset($this->mapObject->nodes[$templateName]))
- 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 handleNODE_USESCALE
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function handleNODE_USESCALE($fullcommand, $args, $matches)
{
$svar = '';
$stype = 'percent';
// in or 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 handleLINK
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function handleLINK($fullcommand, $args, $matches)
{
$this->commitItem();
unset($this->currentObject);
- 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 formatTimeTicks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function formatTimeTicks($value, $prefix, $tokenCharacter, $precision)
{
$joinCharacter = ' ';
if ($prefix == '-') {
$joinCharacter = '';
- 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 drawComments
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function drawComments($gdImage)
{
MapUtility::debug('Link ' . $this->name . ": Drawing comments.\n");
$directions = $this->getDirectionList();
- 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 aggregateDataResults
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function aggregateDataResults()
{
$channels = $this->getChannelList();
foreach ($channels as $channelName => $channel) {
- 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 getPluginFileList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function getPluginFileList($pluginType, $searchDirectory)
{
$pluginList = array();
$directoryHandle = $this->resolveDirectoryAndOpen($searchDirectory);
- 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 handleSET
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function handleSET($fullcommand, $args, $matches)
{
global $weathermap_error_suppress;
$key = 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 warn
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function warn($string, $noticeOnly = false)
{
global $weathermap_map;
global $weathermap_warncount;
global $weathermap_error_suppress;
- 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 addConfigValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function addConfigValue($keyname, $value, $recalculate = false)
{
MapUtility::debug("Appending config %s = %s\n", $keyname, $value);
if (is_null($this->config[$keyname])) {
// create a new array, with this as the only item
- 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 resortMaps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function resortMaps()
{
$stmt = $this->pdo->query('SELECT * FROM weathermap_maps ORDER BY group_id,sortorder;');
$newMapOrder = 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 showMainPage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function showMainPage($editor)
{
global $hostPluginURL;
global $hostEditorURL;
global $hostType;
- 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 cmdDrawMap
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function cmdDrawMap($params, $editor)
{
header("Content-type: image/png");
// If the config file hasn't changed, then the image produced shouldn't have, either
$etag = md5_file($this->mapFileName);
- 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 weathermap_show_tab
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function weathermap_show_tab()
{
global $config, $user_auth_realm_filenames;
if (api_plugin_user_realm_auth('weathermap-cacti10-plugin.php')) {
- 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"