File Container.js
has 344 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* Ext JS Library 3.3.0
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
Container
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
Ext.Container = Ext.extend(Ext.BoxComponent, {
/**
* @cfg {Boolean} monitorResize
* True to automatically monitor window resize events to handle anything that is sensitive to the current size
* of the viewport. This value is typically managed by the chosen <code>{@link #layout}</code> and should not need
Function doLayout
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
doLayout : function(shallow, force){
var rendered = this.rendered,
forceLayout = force || this.forceLayout;
if(this.collapsed || !this.canLayout()){
- 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 cascade
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
cascade : function(fn, scope, args){
if(fn.apply(scope || this, args || [this]) !== false){
if(this.items){
var cs = this.items.items;
for(var i = 0, len = cs.length; i < len; 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
Function doLayout
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
doLayout : function(shallow, force){
var rendered = this.rendered,
forceLayout = force || this.forceLayout;
if(this.collapsed || !this.canLayout()){
Function applyDefaults
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
applyDefaults : function(c){
var d = this.defaults;
if(d){
if(Ext.isFunction(d)){
d = d.call(this, c);
- 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 insert
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
insert : function(index, comp) {
var args = arguments,
length = args.length,
result = [],
i, c;
- 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 afterRender
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
afterRender: function(){
// Render this Container, this should be done before setLayout is called which
// will hook onResize
Ext.Container.superclass.afterRender.call(this);
if(!this.layout){
- 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 add
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
add : function(comp){
this.initItems();
var args = arguments.length > 1;
if(args || Ext.isArray(comp)){
var result = [];
- 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"