Showing 1,514 of 31,573 total issues
File Device.php
has 798 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
namespace App\Models;
use App\View\SimpleTemplate;
File menu.blade.php
has 784 lines of code (exceeds 250 allowed). Consider refactoring. Open
<nav class="navbar navbar-default {{ $navbar }} navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navHeaderCollapse">
<span class="sr-only">{{ __('Toggle navigation') }}</span>
File Timos.php
has 756 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Timos.php
*
* -Description-
File ports.inc.php
has 716 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use LibreNMS\Config;
use LibreNMS\Enum\PortAssociationMode;
use LibreNMS\RRD\RrdDefinition;
File bgp-peers.inc.php
has 706 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use Illuminate\Support\Str;
use LibreNMS\Exceptions\InvalidIpException;
use LibreNMS\RRD\RrdDefinition;
Function updateXML
has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring. Open
function updateXML(&$output, &$rra)
{
global $numspike, $percent, $avgnan, $method, $total_kills;
$new_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
File removespikes.php
has 696 lines of code (exceeds 250 allowed). Consider refactoring. Open
#!/usr/bin/php -q
<?php
/*
ex: set tabstop=4 shiftwidth=4 autoindent:
+-------------------------------------------------------------------------+
File functions.php
has 688 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* LibreNMS
*
File functions.php
has 673 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/*
* Copyright (C) 2009 Bruno Prémont <bonbons AT linux-vserver.org>
*
* This program is free software; you can redistribute it and/or modify it under
Function calculateOverallStatistics
has a Cognitive Complexity of 72 (exceeds 5 allowed). Consider refactoring. Open
function calculateOverallStatistics(&$rra, &$samples)
{
global $percent, $stddev, $ds_min, $ds_max, $var_kills, $std_kills;
$rra_num = 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
File Ironware.php
has 620 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* Ironware.php
*
* Brocade Ironware OS
Method pollOS
has 272 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function pollOS(DataStorageInterface $datastore): void
{
$data = snmp_get_multi($this->getDeviceArray(), [
'panSessionActive.0',
'panSessionActiveTcp.0',
File bind.inc.php
has 613 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
use LibreNMS\RRD\RrdDefinition;
$name = 'bind';
Function runAlerts
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
public function runAlerts()
{
foreach ($this->loadAlerts('alerts.state != ' . AlertState::ACKNOWLEDGED . ' && alerts.open = 1') as $alert) {
$noiss = false;
$noacc = 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 wrapper
has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring. Open
def wrapper(
wrapper_type, # Type: str
amount_of_workers, # Type: int
config, # Type: dict
log_dir, # Type: str
- 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 default.blade.php
has 606 lines of code (exceeds 250 allowed). Consider refactoring. Open
@extends('layouts.librenmsv1')
@section('title', __('Overview'))
@section('content')
Function checkSchema
has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring. Open
private function checkSchema(): void
{
$master_schema = Yaml::parse(file_get_contents($this->schema_file));
$current_schema = Schema::dump();
- 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 __init__.py
has 598 lines of code (exceeds 250 allowed). Consider refactoring. Open
import json
import logging
import os
import sys
import tempfile
File apps.inc.php
has 593 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
$pagetitle[] = 'Apps';
$graphs['apache'] = [
'bits',
File wrapper.py
has 588 lines of code (exceeds 250 allowed). Consider refactoring. Open
#! /usr/bin/env python3
"""
wrapper A small tool which wraps services, discovery and poller php scripts
in order to run them as threads with Queue and workers