Showing 3,486 of 3,486 total issues
Avoid deeply nested control flow statements. Open
if (mo && parent != elem && $.css(parent, 'overflow') != 'visible') {
x += num(parent, 'borderLeftWidth');
y += num(parent, 'borderTopWidth');
}
Function bindStore
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
bindStore: function (store, initial) {
var doLoad;
if (!initial && this.store) {
if (store !== this.store && this.store.autoDestroy) {
this.store.destroy();
- 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 ( c.nodeType == 1 && (nodeName == "*" || c.nodeName.toUpperCase() == nodeName) )
r.push( c );
Avoid deeply nested control flow statements. Open
if ( m[1] == "." )
r = jQuery.classFilter( r, m[2] );
Function handleOffsetReturn
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
var handleOffsetReturn = function(elem, options, x, y, sl, st) {
Function remove
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
remove: function (record) {
if (Ext.isArray(record)) {
Ext.each(record, function (r) {
this.remove(r);
}, this);
- 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.id != match[3] )
return jQuery().find( selector );
// Otherwise, we inject the element directly into the jQuery object
else {
Avoid deeply nested control flow statements. Open
if ( m[1] == "#" ) {
var tmp = [];
// Try to find the element with the ID
for ( var i = 0; r[i]; i++ )
Avoid deeply nested control flow statements. Open
if ( option.selected ) {
// Get the specifc value for the option
value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value;
// We don't need an array for one selects
Avoid deeply nested control flow statements. Open
if ( (jQuery.browser.msie||jQuery.browser.opera) && oid && typeof oid.id == "string" && oid.id != m[2] )
oid = jQuery('[@id="'+m[2]+'"]', elem)[0];
Avoid deeply nested control flow statements. Open
if ( add ^ not )
tmp.push( node );
Function buildMenu
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
buildMenu: function(menuConfig)
{
// check and see if a string was sent in. These will be things like '->', ' ' and '-' for the fill, spacer, and separator shortcuts
if(Ext.isString(menuConfig))
return menuConfig;
- 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 ( first == 0 ) {
if ( node.nodeIndex == last )
add = true;
} else if ( (node.nodeIndex - last) % first == 0 && (node.nodeIndex - last) / first >= 0 )
add = true;
Avoid deeply nested control flow statements. Open
if (options.scroll) {
// get scroll offsets
sl += parent.scrollLeft;
st += parent.scrollTop;
}
Avoid deeply nested control flow statements. Open
for ( ; n; n = n.nextSibling )
if ( n.nodeType == 1 ) {
var id = jQuery.data(n);
if ( m == "~" && merge[id] ) break;
Avoid deeply nested control flow statements. Open
} else if ( isArray( item ) && ( length = item[ STR_LENGTH ] ) ) {
if ( item.P ) {
var i = 0,
Avoid deeply nested control flow statements. Open
rm.jurisdiction = pj if pj
Method sanitize
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def sanitize(conditions,exclude=[:phone])
return unless conditions
email = /[:"\*\!&]/
other = /[:"@\-\*\!\~\&]/
conditions.reject{ |k,v| exclude.include? k }.each do |k,v|
- 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 get_text_response
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def get_text_response(resp, message_hash)
unless resp.ref.blank?
if message_hash[resp.ref]
return message_hash[resp.ref][:value] if message_hash[resp.ref][:value]
return message.Messages.select{|m| m.name == message_hash[resp.ref][:ref]}.first.Value unless message_hash[resp.ref][:ref].blank? # check for blank as m.name will never be blank
- 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 constructor
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
constructor: function(config)
{
Ext.apply(this, config);
Talho.Article3Panel.superclass.constructor.call(this, config);
- 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"