Showing 94 of 116 total issues
Avoid too many return
statements within this function. Open
return this.each(function(){
if ( this.nodeType != 1 )
return;
if ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )
Avoid too many return
statements within this function. Open
return attr === null ? undefined : attr;
Avoid too many return
statements within this function. Open
return elem.filter && elem.filter.indexOf("opacity=") >= 0 ?
(parseFloat( elem.filter.match(/opacity=([^)]*)/)[1] ) / 100) + '':
"";
Avoid too many return
statements within this function. Open
return this.setArray(jQuery.isArray( selector ) ?
selector :
jQuery.makeArray(selector));
Avoid too many return
statements within this function. Open
return jQuery.attr( elem.style, "cssText", value );
Avoid too many return
statements within this function. Open
return (elem.value || "").replace(/\r/g, "");
Avoid too many return
statements within this function. Open
return ( diff % first == 0 && diff / first >= 0 );
Avoid too many return
statements within this function. Open
return undefined;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return diff == 0;
Avoid too many return
statements within this function. Open
return elem[ name ];
Method symbolize_hash
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def symbolize_hash(hash)
symbolled_hash = {}
hash.each_key do |key|
if String === key
next if hash.has_key?(key.to_sym)
- 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
Method initialize
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def initialize(app)
# Call super before setting up probes in case there are any custom probes configured
super # will setup custom probes
- 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
Method delete_cache_list
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def delete_cache_list
validate_params
raise "Rails not found... can't delete key" unless defined?(Rails)
params.each do |key, 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"