Showing 1,065 of 16,781 total issues
Function _buildMemory
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private function _buildMemory()
{
$memory = $this->_xml->addChild('Memory');
$memory->addAttribute('Free', $this->_sys->getMemFree());
$memory->addAttribute('Used', $this->_sys->getMemUsed());
- 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 11 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$i = 0;
$quotas = array();
foreach ($this->_filecontent as $thisline) {
- 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 getUnixId
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function getUnixId()
{
if ($this->osIsWindows()) {
return 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 execute
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public function execute()
{
$this->_lines = array();
switch (strtolower(PSI_PLUGIN_UPRECORDS_ACCESS)) {
case 'command':
- 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 XoopsInfo_moduleoption
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function XoopsInfo_moduleoption($option, $repmodule = 'xoopsinfo')
{
global $xoopsModuleConfig, $xoopsModule;
static $tbloptions = [];
- 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 fetchMedia
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function fetchMedia($media_name, $index = null) {
/*
if ( empty( $this->extensionToMime ) ) {
*/
if ( count( $this->extensionToMime ) == 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 promise
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.ready.promise = function( obj ) {
if ( !readyList ) {
readyList = jQuery.Deferred();
// Catch cases where $(document).ready() is called
Function removeClass
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
removeClass: function( value ) {
var classes, elem, cur, curValue, clazz, j, finalValue,
i = 0;
if ( jQuery.isFunction( value ) ) {
Function handlers
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
handlers: function( event, handlers ) {
var i, matches, sel, handleObj,
handlerQueue = [],
delegateCount = handlers.delegateCount,
cur = event.target;
Function hide
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
_proto.hide = function hide(event) {
var _this2 = this;
if (event) {
event.preventDefault();
Method cpuinfo
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function cpuinfo()
{
$dev = new CpuDevice();
$dev->setModel($this->grabkey('hw.model'));
$dev->setCpuSpeed($this->grabkey('hw.cpuspeed'));
Function renderPlugin_uprecords
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderPlugin_uprecords(data) {
var directives = {
hash: {
html: function () {
Function ifixpng
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
$.fn.ifixpng = hack.ltie7 ? function(customPixel) {
if (customPixel !== undefined) {
$.ifixpng.pixel = customPixel;
}
return this.each(function() {
Function attr
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
attr: function( elem, name, value ) {
var ret, hooks,
nType = elem.nodeType;
// Don't get/set attributes on text, comment and attribute nodes
Method _voltage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _voltage()
{
if (count($this->_values) == 14) {
$dev1 = new SensorDevice();
$dev1->setName('Vcore1');
Method _cpuinfo
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _cpuinfo()
{
if (CommonFunctions::executeProgram('sysinfo', '-cpu', $bufr, PSI_DEBUG)) {
$cpus = preg_split("/\nCPU #\d+/", $bufr, -1, PREG_SPLIT_NO_EMPTY);
Method _pci
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function _pci()
{
$prtconf = $this->prtconf();
if ((count($prtconf)>1) && isset($prtconf['pci'])) {
foreach ($prtconf['pci'] as $prt) {
Function changeSpanLanguage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function changeSpanLanguage(plugin) {
var langId = "", langStr = "", langarrId = current_language + "_";
if (plugin === undefined) {
langarrId += "phpSysInfo";
Function changeSpanLanguage
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function changeSpanLanguage(plugin) {
var langId = "", langStr = "", langarrId = current_language + "_";
if (plugin === undefined) {
langarrId += "phpSysInfo";
Function formatBPS
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formatBPS(bps) {
var show = "";
if (bps > Math.pow(1000, 5)) {
show += round(bps / Math.pow(1000, 5), 2);