Showing 1,065 of 16,781 total issues
Function extend
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
jQuery.extend = jQuery.fn.extend = function() {
var src, copyIsArray, copy, name, options, clone,
target = arguments[ 0 ] || {},
i = 1,
length = arguments.length,
Function html
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
html: function () {
if ((this.Details === undefined) || (this.Details["@attributes"] === undefined)) {
return '<div class="progress">' +
'<div class="progress-bar progress-bar-info" style="width:' + this["@attributes"].Percent + '%;"></div>' +
'</div><div class="percent">' + this["@attributes"].Percent + '%</div>';
Function stop
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
stop: function( type, clearQueue, gotoEnd ) {
var stopQueue = function( hooks ) {
var stop = hooks.stop;
delete hooks.stop;
stop( gotoEnd );
Function renderPlugin_docker
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderPlugin_docker(data) {
var directives = {
CPUUsage: {
html: function () {
Method _filesystems
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _filesystems()
{
$typearray = array('Unknown', 'No Root Directory', 'Removable Disk', 'Local Disk', 'Network Drive', 'Compact Disc', 'RAM Disk');
$floppyarray = array('Unknown', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', '5 1/4 in.', 'Other', 'HD', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '5 1/4 in.', '3 1/2 in.', '3 1/2 in.', '8 in.');
$buffer = CommonFunctions::getWMI($this->_wmi, 'Win32_LogicalDisk', array('Name', 'Size', 'FreeSpace', 'FileSystem', 'DriveType', 'MediaType'));
Method _network
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _network()
{
if (CommonFunctions::executeProgram('netstat', '-nbdi | cut -c1-24,42- | grep Link', $netstat, PSI_DEBUG)) {
$lines = preg_split("/\n/", $netstat, -1, PREG_SPLIT_NO_EMPTY);
foreach ($lines as $line) {
Method xml
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function xml()
{
foreach ($this->_result as $printer=>$markersupplies_item) {
$xmlsnmppinfo_printer = $this->xml->addChild("Printer");
$xmlsnmppinfo_printer->addAttribute("Device", $printer);
Function addCombinator
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addCombinator( matcher, combinator, base ) {
var dir = combinator.dir,
checkNonElements = base && dir === "parentNode",
doneName = done++;
Function getDevice
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
$("Network NetDevice", xml).each(function getDevice(id) {
var name = "", rx = 0, tx = 0, er = 0, dr = 0, info = "", networkindex = 0, htmlrx = '', htmltx = '';
name = $(this).attr("Name");
rx = parseInt($(this).attr("RxBytes"), 10);
tx = parseInt($(this).attr("TxBytes"), 10);
Function fnFilter
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal )
{
var oSettings = _fnSettingsFromNode( this[_oExt.iApiIndex] );
if ( !oSettings.oFeatures.bFilter )
Function on
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function on( elem, types, selector, data, fn, one ) {
var origFn, type;
// Types can be a map of types/handlers
if ( typeof types === "object" ) {
Function showContentOrLoading
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showContentOrLoading() {
debug('showContentOrLoading');
if (modal.ready && !modal.anim) {
if (modal.dataReady) {
if (modal.tmp.html()) {
Function _fnGetTdNodes
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function _fnGetTdNodes ( oSettings, iIndividualRow )
{
var anReturn = [];
var iCorrector;
var anTds;
Function translate
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
translate = function (styles, href, media) {
var qs = styles.replace(respond.regex.comments, "")
.replace(respond.regex.keyframes, "")
.match(respond.regex.media),
ql = qs && qs.length || 0;
Function showHide
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function showHide( elements, show ) {
var display, elem, hidden,
values = [],
index = 0,
length = elements.length;
Function removeModal
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function removeModal(e) {
debug('removeModal');
if (e)
e.preventDefault();
if (modal.full && modal.ready) {
Method get_mimetypes
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $module=-1, $OtherCriteria=null, $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
$criteria->add($OtherCriteria, 'AND');
Function _voltage
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function _voltage()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Voltage" && $buffer[11] != "N/A" && $buffer[4] == "V") {
- 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 _fans
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function _fans()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Fan'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Fan')))
- 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 _current
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
private function _current()
{
foreach ($this->_lines as $line) {
$buffer = preg_split("/\s*\|\s*/", $line);
if ($buffer[2] == "Current" && $buffer[11] != "N/A" && $buffer[4] == "A") {
- 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"