Showing 1,065 of 16,781 total issues
Method list_mimetypes_perms
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
function list_mimetypes_perms()
{
global $xoopsModule, $uri, $status, $mid, $start, $type;
$mimetypes_Handler = xoops_getHandler('mimetypes_perms');
Function full_addr
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function full_addr(ip_string) {
var wrongvalue = false;
ip_string = $.trim(ip_string).toLowerCase();
// ipv4 notation
if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
- 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 fillCpu
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function fillCpu(xml, tree, rootposition, collapsed) {
var cpucount = 0, html = "";
$("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++;
- 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 buildpage
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
$(document).ready(function buildpage() {
var i = 0, old_template = null, cookie_template = null, cookie_language = null, blocktmp = "";
showCPUListExpanded = $("#showCPUListExpanded").val().toString()==="true";
showCPUInfoExpanded = $("#showCPUInfoExpanded").val().toString()==="true";
- 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 full_addr
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
function full_addr(ip_string) {
var wrongvalue = false;
ip_string = $.trim(ip_string).toLowerCase();
// ipv4 notation
if (ip_string.match(/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$)/)) {
- 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 _getCodeSet
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
private function _getCodeSet()
{
$buffer = $this->_get_Win32_OperatingSystem();
if (!$buffer) {
if (CommonFunctions::readReg($this->_reg, "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Nls\\CodePage\\ACP", $strBuf, 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 _info
has a Cognitive Complexity of 27 (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
Method execute_graid
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function execute_graid($buffer)
{
if (preg_match('/^Geom name: +([^\n\r]+)/', $buffer, $geom)) {
$controller = trim($geom[1]);
} else {
Function refreshNetwork
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
function refreshNetwork(xml) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('network', blocks) < 0))) {
$("#network").remove();
return;
}
Method _outputRenderTable
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function _outputRenderTable($group_name, $group_results)
{
// exit out if $group_results was empty or not an array. This sorta seems a little hacky...
if (!is_array($group_results) || count($group_results) < 1) {
return false;
Function renderUPS
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderUPS(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('ups', blocks) < 0))) {
$("#block_ups").remove();
return;
}
Function getVitals
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
$("Vitals", xml).each(function getVitals(id) {
hostname = $(this).attr("Hostname");
ip = $(this).attr("IPAddr");
kernel = $(this).attr("Kernel");
distro = $(this).attr("Distro");
Function stablebit_getdisks
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
$("Plugins Plugin_StableBit Disk", xml).each(function stablebit_getdisks(id) {
var name = "";
name = $(this).attr("Name");
if (name !== undefined) {
var serialnumber = "", firmware = "", size = 0, powerstate = "", temperaturec = "",
Method _buildMbinfo
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _buildMbinfo()
{
$mbinfo = $this->_xml->addChild('MBInfo');
$temp = $fan = $volt = $power = $current = $other = null;
Function renderPlugin_stablebit
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderPlugin_stablebit(data) {
var directives = {
IsHot: {
html: function () {
Function fnUpdate
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
"fnUpdate": function ( oSettings, fnCallbackDraw )
{
if ( !oSettings.aanFeatures.p )
{
return;
Function refreshMemory
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
function refreshMemory(xml) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('memory', blocks) < 0))) {
$("#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
Function cpuinfo
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
protected function cpuinfo()
{
$dev = new CpuDevice();
$dev->setModel($this->grabkey('hw.model'));
$dev->setCpuSpeed($this->grabkey('hw.cpuspeed'));
- 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 trigger
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
trigger: function( event, data, elem, onlyHandlers ) {
var handle, ontype, cur,
bubbleType, special, tmp, i,
eventPath = [ elem || document ],
type = hasOwn.call( event, "type" ) ? event.type : event,
Function Animation
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Animation( elem, properties, options ) {
var result,
stopped,
index = 0,
length = Animation.prefilters.length,