Showing 476 of 1,049 total issues
Avoid deeply nested control flow statements. Open
Open
if ( !(unmatched[i] || setMatched[i]) ) {
setMatched[i] = pop.call( results );
}
Avoid deeply nested control flow statements. Open
Open
if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
return true;
}
Avoid deeply nested control flow statements. Open
Open
if (target.is('.old')) {
if (month === 0) {
month = 11;
year -= 1;
} else {
Avoid deeply nested control flow statements. Open
Open
while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
cur = cur.replace( " " + clazz + " ", " " );
}
Avoid deeply nested control flow statements. Open
Open
if ( name in thisCache ) {
name = [ name ];
} else {
name = name.split(" ");
}
Avoid deeply nested control flow statements. Open
Open
if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
e.preventDefault();
if (keyCode == VK.LEFT) {
positionCaretOnElement(nonEditableParent, true);
Avoid deeply nested control flow statements. Open
Open
if (!isForward && removeList(li.parentNode.nodeName)) {
return true;
}
Avoid deeply nested control flow statements. Open
Open
if (!dom.hasClass(node, 'mce-item-selected')) {
break;
}
Avoid deeply nested control flow statements. Open
Open
if (nonEditableParent && getContentEditable(nonEditableParent) === "false") {
e.preventDefault();
if (keyCode == VK.RIGHT) {
positionCaretOnElement(nonEditableParent, false);
Avoid deeply nested control flow statements. Open
Open
if (rowSpan) {
if (y + rowSpan > maxY) {
maxY = y + rowSpan;
}
}
Avoid deeply nested control flow statements. Open
Open
if (!textBlock) {
textBlock = dom.create(blockName);
fragment.appendChild(textBlock);
}
Avoid deeply nested control flow statements. Open
Open
if (colSpan) {
if (x + colSpan > maxX) {
maxX = x + colSpan;
}
}
Avoid deeply nested control flow statements. Open
Open
if (listElements[y] === node) {
listElements.splice(i, 1);
break;
}
Avoid deeply nested control flow statements. Open
Open
for (c = 1; c <= cols; c++) {
dom.insertAfter(cloneCell(cell), cell);
}
Avoid deeply nested control flow statements. Open
Open
for (var i = 0; i < groups.length; i++) {
if (!groups[i].filter || groups[i].filter(selector)) {
if (!groups[i].item) {
groups[i].item = {text: groups[i].title, menu: []};
}
Avoid deeply nested control flow statements. Open
Open
if (editor.settings.video_template_callback) {
html = editor.settings.video_template_callback(data);
} else {
html = (
'<video width="' + data.width + '" height="' + data.height + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' +
Avoid deeply nested control flow statements. Open
Open
if (value) {
attrs.map[name] = value;
attr.value = value;
} else {
delete attrs.map[name];
Avoid deeply nested control flow statements. Open
Open
if (rowSpan > 1) {
setSpanVal(otherCell, 'rowSpan', rowSpan + 1);
continue;
}
Avoid deeply nested control flow statements. Open
Open
if (children.length) {
children = Tools.grep(startCell.childNodes);
count = 0;
each(children, function(node) {
if (node.nodeName == 'BR' && dom.getAttrib(node, 'data-mce-bogus') && count++ < children.length - 1) {
Function arrayToXml
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
protected function arrayToXml($result, &$xml)
{
foreach ($result as $key => $value) {
if (is_array($value)) {
if (!is_numeric($key)) {
- 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"