Showing 1,065 of 16,781 total issues
Function _usb
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function _usb()
{
if (CommonFunctions::rfts('/proc/bus/usb/devices', $bufr, 0, 4096, false)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
$devnum = -1;
- 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 _memory
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function _memory()
{
if (CommonFunctions::rfts('/proc/meminfo', $bufr)) {
$bufe = preg_split("/\n/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
foreach ($bufe as $buf) {
- 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 pci
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function pci()
{
if (!$arrResults = Parser::lspci(false)) { //no lspci port
$s = $this->_grabioreg('IOPCIDevice');
$lines = preg_split("/\n/", $s, -1, PREG_SPLIT_NO_EMPTY);
- 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 fileexists
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static function fileexists($strFileName)
{
if (defined('PSI_LOG') && is_string(PSI_LOG) && (strlen(PSI_LOG)>0) && ((substr(PSI_LOG, 0, 1)=="-") || (substr(PSI_LOG, 0, 1)=="+"))) {
$log_file = substr(PSI_LOG, 1);
if (file_exists($log_file)
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
public function __construct()
{
parent::__construct();
if (defined('PSI_UPS_APCUPSD_LIST') && is_string(PSI_UPS_APCUPSD_LIST)) {
if (preg_match(ARRAY_EXP, PSI_UPS_APCUPSD_LIST)) {
- 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 _pci
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
protected function _pci()
{
if (CommonFunctions::rfts('/proc/pci', $strBuf, 0, 4096, false)) {
$arrLines = preg_split("/\n/", $strBuf, -1, PREG_SPLIT_NO_EMPTY);
$arrResults = 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 xml
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public function xml()
{
if (empty($this->_result) || empty($this->_ids)) {
return $this->xml->getSimpleXmlElement();
}
- 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 13 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
if (empty($this->_filecontent)) {
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 access
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
var i = 0,
length = elems.length,
bulk = key == null;
Method _scsi
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _scsi()
{
$getline = 0;
$device = null;
$scsiid = null;
Method _memory
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _memory()
{
$mems = "";
$tswap = "";
$pswap = "";
Function renderFans
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderFans(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('fans', blocks) < 0))) {
$("#block_fans").remove();
return;
}
Function renderPower
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderPower(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('power', blocks) < 0))) {
$("#block_power").remove();
return;
}
Function renderTemperature
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderTemperature(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('temperature', blocks) < 0))) {
$("#block_temperature").remove();
return;
}
Function _fnFeatureHtmlFilter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnFeatureHtmlFilter ( oSettings )
{
var sSearchStr = oSettings.oLanguage.sSearch;
sSearchStr = (sSearchStr.indexOf('_INPUT_') !== -1) ?
sSearchStr.replace('_INPUT_', '<input type="text" />') :
Function nyroModal
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.nyroModal = function(settings) {
if (!this)
return false;
return this.each(function() {
var me = $(this);
Method _power
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _power()
{
$sname = '';
foreach ($this->_lines as $line) {
if ((trim($line) !== "") && (strpos($line, ':') === false)) {
Function fillHWDevice
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function fillHWDevice(xml, type, tree, rootposition) {
var devicecount = 0, html = "";
$("Hardware " + type + " Device", xml).each(function getHWDevice(deviceId) {
var name = "", count = 0, capacity = 0, manufacturer = "", product = "", serial = "", devcoreposition = 0;
Function getLanguage
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getLanguage(plugin, langarrId) {
var getLangUrl = "";
if (current_language) {
getLangUrl = 'language/language.php?lang=' + current_language;
if (plugin) {
Function when
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
when: function( subordinate /* , ..., subordinateN */ ) {
var i = 0,
resolveValues = slice.call( arguments ),
length = resolveValues.length,