Showing 7,504 of 7,504 total issues
Function setHash
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
setHash : function(name, values_obj, expires, path, domain, secure) {
Function set
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
set : function(name, value, expires, path, domain, secure) {
Avoid deeply nested control flow statements. Open
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
Avoid deeply nested control flow statements. Open
if (v !== undefined) {
value[k] = v;
} else {
delete value[k];
}
Function code
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function code( s, discard, alpha, beta, w1, w2 ) {
Avoid deeply nested control flow statements. Open
if (v) {
partial.push(quote(k) + (gap ? ': ' : ':') + v);
}
Function schedule
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function schedule() {
var now = new Date();
var date = now.getDate();
var month = now.getMonth();
var month = month + 1;
- 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 (t.id==this.divName) {
return true;
}
Function getStyle
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
getStyle: function(element, style) {
element = $(element);
style = style == 'float' ? 'cssFloat' : style.camelize();
var value = element.style[style];
if (!value) {
- 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 (targetNode.parentNode == node) return [targetNode];
Avoid deeply nested control flow statements. Open
while (t.parentNode != null) {
if (t.id==this.divName) {
return true;
}
t = t.parentNode;
Function Methods
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Event.Methods = (function() {
var isButton;
if (Prototype.Browser.IE) {
var buttonMap = { 0: 1, 1: 4, 2: 2 };
- 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(element.tagName == 'IMG' && element.width) {
element.width++; element.width--;
} else try {
var n = document.createTextNode(' ');
element.appendChild(n);
Avoid deeply nested control flow statements. Open
if (element.offsetParent == document.body)
if (Element.getStyle(element, 'position') == 'absolute') break;
Avoid deeply nested control flow statements. Open
} else if (combinator == 'adjacent') {
for (var i = 0, node; node = nodes[i]; i++)
if (Selector.handlers.previousElementSibling(targetNode) == node)
return [targetNode];
} else nodes = h[combinator](nodes);
Avoid deeply nested control flow statements. Open
if (node.nodeIndex == indices[j]) results.push(node);
Avoid deeply nested control flow statements. Open
if ( typeof elem.getElementsByTagName !== "undefined" ) {
// handleScript alters the DOM, so use jQuery.merge to ensure snapshot iteration
jsTags = jQuery.grep( jQuery.merge( [], elem.getElementsByTagName("script") ), handleScript );
// Splice the scripts into ret after their former ancestor and advance our index beyond them
Avoid deeply nested control flow statements. Open
if (value[1]) return parseFloat(value[1]) / 100;
Avoid deeply nested control flow statements. Open
for (var i = 0, node; node = nodes[i]; i++)
if (Element.descendantOf(targetNode, node)) return [targetNode];
Avoid deeply nested control flow statements. Open
if ( key.indexOf('wp-autosave-') != -1 )
sessionStorage.removeItem(key);