Showing 1,065 of 16,781 total issues
Function cpuinfo
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
protected function cpuinfo()
{
$dev = new CpuDevice();
if (PSI_OS == "NetBSD") {
- 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 _cpuinfo
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
protected function _cpuinfo()
{
if (CommonFunctions::rfts('/proc/cpuinfo', $bufr, 0, 4096, false)) {
$processors = preg_split('/\s?\n\s?\n/', trim($bufr));
foreach ($processors as $processor) {
- 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 execute
has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
if (count($this->_filecontent)>0) {
foreach ($this->prog_items as $item) if (isset($this->_filecontent[$item])) {
if ($item !== 'idrac') {
- 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 _fnCalculateColumnWidths
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnCalculateColumnWidths ( oSettings )
{
var iTableWidth = oSettings.nTable.offsetWidth;
var iUserInputs = 0;
var iTmpWidth;
Function 4
has 158 lines of code (exceeds 25 allowed). Consider refactoring. Open
},{"./helpers":5,"./instance":6}],4:[function(require,module,exports){
var AttributeFactory, Checkbox, Element, ElementFactory, Input, Radio, Select, TextArea, VoidElement, helpers, _,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Function _info
has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring. Open
private function _info()
{
foreach ($this->_output as $ups) {
$dev = new UPSDevice();
- 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 renderMemory
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
function renderMemory(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
$("#block_memory").remove();
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 _network
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _network()
{
if ($this->_wmi) {
$buffer = $this->_get_Win32_OperatingSystem();
if ($buffer && isset($buffer[0]) && isset($buffer[0]['Version']) && version_compare($buffer[0]['Version'], "6.2", ">=")) { // minimal windows 2012 or windows 8
Method execute
has 149 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
if (empty($this->_filecontent) || empty($this->_ids)) {
return;
}
Method _buildHardware
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _buildHardware()
{
$hardware = $this->_xml->addChild('Hardware');
if ($this->_sys->getMachine() != "") {
$hardware->addAttribute('Name', $this->_sys->getMachine());
Function _scsi
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
private function _scsi()
{
$getline = 0;
$device = null;
$scsiid = 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 install_MimeTypes
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
function install_MimeTypes($dirname = '')
{
include_once(XOOPS_ROOT_PATH . '/kernel/mimetypes.php');
$hModule = xoops_getHandler('module');
- 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 __construct
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
public function __construct($enc)
{
parent::__construct(__CLASS__, $enc);
if (defined('PSI_PLUGIN_PINGTEST_ADDRESSES') && is_string(PSI_PLUGIN_PINGTEST_ADDRESSES)) {
if (preg_match(ARRAY_EXP, PSI_PLUGIN_PINGTEST_ADDRESSES)) {
- 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 class.BSDCommon.inc.php
has 412 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* BSDCommon Class
*
* PHP version 5
Method execute_zpool
has 144 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function execute_zpool($buffer)
{
$raiddata = preg_split("/(\r?\n)+ +(?=pool: )/", $buffer, -1, PREG_SPLIT_NO_EMPTY);
if (!empty($raiddata)) foreach ($raiddata as $raid) {
if (preg_match("/^pool: (\S+)/", $raid, $buff)) {
Function refreshNetwork
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
function refreshNetwork(xml) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
$("#network").remove();
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 renderPlugin_ps
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
function renderPlugin_ps(data) {
var directives = {
MemoryUsage: {
html: function () {
- 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 _network
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
private function _network()
{
if (CommonFunctions::executeProgram('ifconfig', '', $bufr, PSI_DEBUG)) {
$lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
$was = 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 _parseProcStat
has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring. Open
protected function _parseProcStat($cpuline)
{
if (is_null($this->_cpu_loads)) {
$this->_cpu_loads = 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 jquery.treegrid.js
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* jQuery treegrid Plugin 0.3.0
* https://github.com/maxazan/jquery-treegrid
*
* Copyright 2013, Pomazan Max