Showing 1,065 of 16,781 total issues
Consider simplifying this complex logical expression. Open
Open
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
// Trust units reported by jQuery.css
unit = unit || initialInUnit[ 3 ];
Consider simplifying this complex logical expression. Open
Open
if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
$dev->setMax($limits[1]);
Consider simplifying this complex logical expression. Open
Open
if ((isset($buffer[8]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[8], $limits))
||(isset($buffer[9]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[9], $limits))
||(isset($buffer[10]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[10], $limits))
||(isset($buffer[11]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
$dev->setMin($limits[1]);
Consider simplifying this complex logical expression. Open
Open
if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
$dev->setMax($limits[1]);
Consider simplifying this complex logical expression. Open
Open
if ((isset($buffer[8]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[8], $limits))
||(isset($buffer[9]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[9], $limits))
||(isset($buffer[10]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[10], $limits))
||(isset($buffer[11]) && preg_match("/^lo-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
$dev->setMin($limits[1]);
Consider simplifying this complex logical expression. Open
Open
if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
$dev->setMax($limits[1]);
Consider simplifying this complex logical expression. Open
Open
if ((isset($buffer[8]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[8], $limits))
||(isset($buffer[9]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[9], $limits))
||(isset($buffer[10]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[10], $limits))
||(isset($buffer[11]) && preg_match("/^hi-crit\s(\S+)\s*$/", $buffer[11], $limits))) {
$dev->setMax($limits[1]);
Consider simplifying this complex logical expression. Open
Open
if (PSI_DEBUG || (($level !== 2) && ($level !== 8)) || !(preg_match("/^[^:]*: open_basedir /", $message) || preg_match("/^fopen\(/", $message) || preg_match("/^is_readable\(/", $message) || preg_match("/^file_exists\(/", $message) || preg_match("/^fgets\(/", $message))) { // disable open_basedir, fopen, is_readable, file_exists and fgets warnings and notices
$error->addPhpError("errorHandlerPsi : ", "Level : ".$level." Message : ".$message." File : ".$file." Line : ".$line);
}
Consider simplifying this complex logical expression. Open
Open
if (preg_match('/\s+encap:Ethernet\s+HWaddr\s(\S+)/i', $line, $ar_buf2)
|| preg_match('/^\s+ether\s+(\S+)\s+txqueuelen/i', $line, $ar_buf2)) {
if (!defined('PSI_HIDE_NETWORK_MACADDR') || !PSI_HIDE_NETWORK_MACADDR) $macaddr = preg_replace('/:/', '-', strtoupper($ar_buf2[1]));
} elseif (preg_match('/^\s+inet\saddr:(\S+)\s+P-t-P:(\S+)/i', $line, $ar_buf2)
|| preg_match('/^\s+inet\s+(\S+)\s+netmask.+destination\s+(\S+)/i', $line, $ar_buf2)) {
Function getMemory
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$("Memory", xml).each(function getMemory(id) {
var free = 0, total = 0, used = 0, percent = 0, memoryindex = 0;
free = parseInt($(this).attr("Free"), 10);
used = parseInt($(this).attr("Used"), 10);
total = parseInt($(this).attr("Total"), 10);
Function show
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_proto.show = function show(relatedTarget) {
var _this = this;
if (this._isShown || this._isTransitioning) {
return;
Function setCurrentSettings
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function setCurrentSettings(settings, deep1, deep2) {
if (modal.started) {
if (deep1 && deep2) {
$.extend(true, currentSettings[deep1][deep2], settings);
} else if (deep1) {
Method _current
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function _current($hwpath)
{
$sensor = glob($hwpath."curr*_input", GLOB_NOSORT);
if (is_array($sensor) && (($total = count($sensor)) > 0)) {
$buf = "";
Method _power
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function _power($hwpath)
{
$sensor = glob($hwpath."power*_input", GLOB_NOSORT);
if (is_array($sensor) && (($total = count($sensor)) > 0)) {
$buf = "";
Method _voltage
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function _voltage($hwpath)
{
$sensor = glob($hwpath."in*_input", GLOB_NOSORT);
if (is_array($sensor) && (($total = count($sensor)) > 0)) {
$buf = "";
Method execute
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute()
{
if (count($this->_filecontent)>0) {
foreach ($this->prog_items as $item) if (isset($this->_filecontent[$item])) {
if ($item !== 'idrac') {
Method runTests
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function runTests()
{
// initialize a bunch of arrays
$this->test_results = [];
Function data
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: function( key, value ) {
var i, name, data,
elem = this[ 0 ],
attrs = elem && elem.attributes;
Function fixCloneNodeIssues
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fixCloneNodeIssues( src, dest ) {
var nodeName, e, data;
// We do not need to do anything for non-Elements
if ( dest.nodeType !== 1 ) {
Function cleanData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
cleanData: function( elems, /* internal */ forceAcceptData ) {
var elem, type, id, data,
i = 0,
internalKey = jQuery.expando,
cache = jQuery.cache,