Showing 1,065 of 16,781 total issues
Function toggleClass
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
toggleClass: function( value, stateVal ) {
var type = typeof value;
if ( typeof stateVal === "boolean" && type === "string" ) {
return stateVal ? this.addClass( value ) : this.removeClass( value );
Function ajaxHandleResponses
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ajaxHandleResponses( s, jqXHR, responses ) {
var firstDataType, ct, finalDataType, type,
contents = s.contents,
dataTypes = s.dataTypes;
Function style
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
style: function( elem, name, value, extra ) {
// Don't set styles on text and comment nodes
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
return;
Method _getCodeSet
has 37 lines of code (exceeds 25 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)) {
Method execute
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function execute()
{
if (empty($this->_filecontent)) {
return;
}
Method _xmlbody
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _xmlbody()
{
$dom = new DOMDocument('1.0', 'UTF-8');
$root = $dom->createElement("tns:phpsysinfo");
$root->setAttribute('xmlns:tns', 'http://phpsysinfo.sourceforge.net/');
Method get_mimetypes
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function get_mimetypes($limit=20, $start=0, $status=-1, $OtherCriteria=null, $sort='mime_ext', $order='ASC', $asobject=true) {
$ret = array();
$criteria = new CriteriaCompo();
if ( is_object($OtherCriteria) ) {
Function clone
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
clone: function( elem, dataAndEvents, deepDataAndEvents ) {
var destElements, node, clone, i, srcElements,
inPage = jQuery.contains( elem.ownerDocument, elem );
if ( support.html5Clone || jQuery.isXMLDoc( elem ) ||
Function dispatch
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
dispatch: function( event ) {
// Make a writable jQuery.Event from the native event object
event = jQuery.event.fix( event );
Function replaceCSS
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
replaceCSS: function (cssText) {
if (cssText) {
// Replace all properties containing REM units with their pixel equivalents.
return cssText.replace(
/([\d]+\.[\d]+|\.[\d]+|[\d]+)rem/g, function (fullMatch, groupMatch) {
Function _showElement
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
_proto._showElement = function _showElement(relatedTarget) {
var _this3 = this;
var transition = $(this._element).hasClass(ClassName.FADE);
Method _cpuinfo
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _cpuinfo()
{
if (CommonFunctions::rfts('/proc/cpuinfo', $bufr)) {
$processors = preg_split('/\s?\n\s?\n/', trim($bufr));
foreach ($processors as $processor) {
Method pciconf
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function pciconf()
{
$arrResults = array();
$intS = 0;
if (CommonFunctions::executeProgram("pciconf", "-lv", $strBuf, PSI_DEBUG)) {
Method _buildXml
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _buildXml()
{
if (!$this->_plugin_request || $this->_complete_request) {
if ($this->_sys === null) {
if (PSI_DEBUG === true) {
Method _toUTF8
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _toUTF8($str)
{
$str = trim(preg_replace('/[\x00-\x09\x0b-\x1F]/', ' ', $str)); //remove nonprintable characters
if ($this->_encoding != null) {
if (strcasecmp($this->_encoding, "UTF-8") == 0) {
Method _filesystems
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function _filesystems()
{
if (CommonFunctions::executeProgram('df', '-k', $df, PSI_DEBUG)) {
$df = preg_replace('/\n\s/m', ' ', $df);
$mounts = preg_split("/\n/", $df, -1, PREG_SPLIT_NO_EMPTY);
Function renderCurrent
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function renderCurrent(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('current', blocks) < 0))) {
$("#block_current").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 renderVoltage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function renderVoltage(data) {
if ((blocks.length <= 0) || ((blocks[0] !== "true") && ($.inArray('voltage', blocks) < 0))) {
$("#block_voltage").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 ps_buildTable
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function ps_buildTable(xml) {
var html = "", tree = [], closed = [], memwas = false, cpuwas = false;
$("#Plugin_PS #Plugin_PSTable").remove();
- 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 _power
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private function _power()
{
foreach ($this->_buf as $sensor) {
if (((isset($sensor['Sensor Type (Threshold)']) && ($sensor['Sensor Type (Threshold)'] == 'Current'))
||(isset($sensor['Sensor Type (Analog)']) && ($sensor['Sensor Type (Analog)'] == 'Current')))
- 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"