Showing 540 of 47,256 total issues
Avoid deeply nested control flow statements. Open
if ( !(unmatched[i] || setMatched[i]) ) {
setMatched[i] = pop.call( results );
}
Avoid deeply nested control flow statements. Open
if (Element.getStyle(element, 'position') == 'absolute') break;
Avoid deeply nested control flow statements. Open
if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
return false;
}
Avoid deeply nested control flow statements. Open
if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
if ( useCache ) {
(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
}
Function isApplied
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function isApplied()
{
if (!isset($_SESSION[__CLASS__]) || !is_array($_SESSION[__CLASS__])) {
$_SESSION[__CLASS__] = array();
}
- 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
Avoid deeply nested control flow statements. Open
if ( !selector ) {
push.apply( results, seed );
return results;
}
Avoid deeply nested control flow statements. Open
} else if (this.type == "vertical") { box2.style.top = (box1.offsetTop + this.position.level1.top) + "px"; if (this.browser.ie5) { box2.style.left = (box1.offsetWidth + this.position.level1.left) + "px";} else { box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.level1.Left) + "px";}
}
Function updateContent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
updateContent: function(responseText) {
var receiver = this.container[this.success() ? 'success' : 'failure'],
options = this.options;
if (!options.evalScripts) responseText = responseText.stripScripts();
- 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
Avoid deeply nested control flow statements. Open
if ( (elem = matcherOut[i]) ) {
temp.push( (matcherIn[i] = elem) );
}
Avoid deeply nested control flow statements. Open
if(n<=14){
r = 255-(n * 17);
g=b=0;
}else if(n>14 && n<=28){
g = 255-((n-14) * 17);
Avoid deeply nested control flow statements. Open
nodes[i].id = id + "-" + (tree.length - 1) + "-section"; var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); var el = new Element(box1.id); if (el.level == 1) { if (this.type == "horizontal") { box2.style.top = (box1.offsetTop + box1.offsetHeight + this.position.level1.top) + "px"; if (this.browser.ie5) { box2.style.left = (this.position.level1.left) + "px";} else {
/* Start open menu from right_to_left - added by stranger @ www.impresscms.ir , Script & Original hack are made by irmtfan (www.jadoogaran.org) */
box2.style.Right = ( box1.offsetLeft + this.position.level1.left) + "px";}
Avoid deeply nested control flow statements. Open
if ( elem && elem.parentNode ) {
if ( elem.id === m ) {
results.push( elem );
return results;
}
Avoid deeply nested control flow statements. Open
if ( Expr.relative[ tokens[j].type ] ) {
break;
}
Avoid deeply nested control flow statements. Open
if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
contains( context, elem ) && elem.id === m ) {
results.push( elem );
return results;
}
Function $
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function $() {
var elements = new Array();
for (var i = 0; i < arguments.length; i++) {
var element = arguments[i];
- 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
Avoid deeply nested control flow statements. Open
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
return true;
}
Function addItem
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function addItem(itemurl, name, target, cat, url, type) {
Function isApplied
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public function isApplied() {
if (!isset($_SESSION[__CLASS__]) || !is_array($_SESSION[__CLASS__])) {
$_SESSION[__CLASS__] = array();
}
foreach ($this->tasks as $task) {
- 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 isApplied
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function isApplied()
{
if (!isset($_SESSION[__CLASS__]) || !is_array($_SESSION[__CLASS__])) {
$_SESSION[__CLASS__] = array();
}
- 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
Avoid deeply nested control flow statements. Open
if ($template != '') {
$tplfile =& $tplfile_handler->find('default', 'block', $fblock['bid']);
if (count($tplfile) == 0) {
$tplfile_new =& $tplfile_handler->create();
$tplfile_new->setVar('tpl_module', $dirname);