Showing 1,065 of 16,781 total issues
Method _filesystems
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _filesystems()
{
$notwas = true;
if (CommonFunctions::executeProgram('df', '2>/dev/null ', $df, PSI_DEBUG) && preg_match("/\s+[0-9\.]+[KMGT]\s+/", $df)) {
$df = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
WINNT
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class WINNT extends OS
{
/**
* holds the data from WMI Win32_OperatingSystem
*
JavaScriptPacker
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class JavaScriptPacker
{
// constants
const IGNORE = '$1';
Function Deferred
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Deferred: function( func ) {
var tuples = [
// action, add listener, listener list, final state
[ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
Method ide
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function ide()
{
foreach ($this->readdmesg() as $line) {
if (preg_match('/^(ad[0-9]+): (.*)MB <(.*)> (.*) (.*)/', $line, $ar_buf)) {
$dev = new HWDevice();
Method _buildFilesystems
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _buildFilesystems()
{
$hideMounts = $hideFstypes = $hideDisks = $ignoreFree = $ignoreUsage = $ignoreThreshold = array();
$i = 1;
if (defined('PSI_HIDE_MOUNTS') && is_string(PSI_HIDE_MOUNTS)) {
Function reload
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
function reload(initiate) {
$("#errorbutton").css("visibility", "hidden");
$("#errorbutton").css('cursor', 'default');
$("#errorbutton").attr('data-toggle', '');
$("#errors").empty();
Function getCpuCore
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
$("Hardware CPU CpuCore", xml).each(function getCpuCore(cpuCoreId) {
var model = "", speed = 0, bus = 0, cache = 0, bogo = 0, temp = 0, load = 0, speedmax = 0, speedmin = 0, cpucoreposition = 0, virt = "", manufacturer = "";
cpucount++;
model = $(this).attr("Model");
speed = parseInt($(this).attr("CpuSpeed"), 10);
Function _processes
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function _processes()
{
if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
$lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
$processes['*'] = 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
Function _processes
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function _processes()
{
if (CommonFunctions::executeProgram('ps', 'aux', $bufr, PSI_DEBUG)) {
$lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
$processes['*'] = 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
Function _processes
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
protected function _processes()
{
if (CommonFunctions::executeProgram('ps', 'alx', $bufr, PSI_DEBUG)) {
$lines = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
$processes['*'] = 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
Function _addchild
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private function _addchild($child, SimpleXMLExtended $xml, &$positions)
{
foreach ($child as $key=>$value) {
$xmlnode = $xml->addChild("Process");
if (isset($value[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
Function gdc
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
public static function gdc($strPath, $booErrorRep = true)
{
$arrDirectoryContent = array();
$error = PSI_Error::singleton();
if (is_dir($strPath)) {
- 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.HPUX.inc.php
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
<?php
/**
* HP-UX System Class
*
* PHP version 5
Function _fnFeatureHtmlLength
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnFeatureHtmlLength ( oSettings )
{
if ( oSettings.oScroll.bInfinite )
{
return null;
Function wrapContent
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
function wrapContent() {
debug('wrapContent');
var wrap = $(currentSettings.wrap[currentSettings.type]);
modal.content.append(wrap.children().remove());
Function 1
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var $, Context, Transparency, helpers, _,
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
_ = require('../lib/lodash.js');
Method _cpuinfo
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _cpuinfo()
{
$allCpus = $this->_get_Win32_Processor();
if (!$allCpus) {
$hkey = "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor";
Method _network
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _network()
{
$dev = null;
if (CommonFunctions::executeProgram('netstat', '-nibd', $netstat, PSI_DEBUG)) {
$lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
Method _info
has 60 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _info()
{
foreach ($this->_output as $ups) {
$dev = new UPSDevice();