talho/openphin

View on GitHub
app/assets/javascripts/ext/src/widgets/Panel.js

Summary

Maintainability
F
1 wk
Test Coverage

File Panel.js has 782 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
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 day to fix

    Function onResize has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

        onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
            var w = adjWidth,
                h = adjHeight;
    
            if(Ext.isDefined(w) || Ext.isDefined(h)){
    Severity: Minor
    Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 day to fix

    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

    Panel has 54 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Ext.Panel = Ext.extend(Ext.Container, {
        /**
         * The Panel's header {@link Ext.Element Element}. Read-only.
         * <p>This Element is used to house the {@link #title} and {@link #tools}</p>
         * <br><p><b>Note</b>: see the Note for <code>{@link Ext.Component#el el}</code> also.</p>
    Severity: Major
    Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 7 hrs to fix

      Function onRender has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
      Open

          onRender : function(ct, position){
              Ext.Panel.superclass.onRender.call(this, ct, position);
              this.createClasses();
      
              var el = this.el,
      Severity: Minor
      Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 7 hrs to fix

      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 onRender has 129 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          onRender : function(ct, position){
              Ext.Panel.superclass.onRender.call(this, ct, position);
              this.createClasses();
      
              var el = this.el,
      Severity: Major
      Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 5 hrs to fix

        Function addTool has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
        Open

            addTool : function(){
                if(!this.rendered){
                    if(!this.tools){
                        this.tools = [];
                    }
        Severity: Minor
        Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 3 hrs to fix

        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 onResize has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
                var w = adjWidth,
                    h = adjHeight;
        
                if(Ext.isDefined(w) || Ext.isDefined(h)){
        Severity: Major
        Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 2 hrs to fix

          Function initComponent has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              initComponent : function(){
                  Ext.Panel.superclass.initComponent.call(this);
          
                  this.addEvents(
                      /**
          Severity: Minor
          Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 hr to fix

            Function addTool has 46 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                addTool : function(){
                    if(!this.rendered){
                        if(!this.tools){
                            this.tools = [];
                        }
            Severity: Minor
            Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 hr to fix

              Function beforeDestroy has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  beforeDestroy : function(){
                      Ext.Panel.superclass.beforeDestroy.call(this);
                      if(this.header){
                          this.header.removeAllListeners();
                      }
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 hr to fix

                Function initComponent has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                    initComponent : function(){
                        Ext.Panel.superclass.initComponent.call(this);
                
                        this.addEvents(
                            /**
                Severity: Minor
                Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 hr to fix

                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 setIconClass has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
                Open

                    setIconClass : function(cls){
                        var old = this.iconCls;
                        this.iconCls = cls;
                        if(this.rendered && this.header){
                            if(this.frame){
                Severity: Minor
                Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 hr to fix

                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 beforeDestroy has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    beforeDestroy : function(){
                        Ext.Panel.superclass.beforeDestroy.call(this);
                        if(this.header){
                            this.header.removeAllListeners();
                        }
                Severity: Minor
                Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 1 hr to fix

                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 createElement has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                Open

                    createElement : function(name, pnode){
                        if(this[name]){
                            pnode.appendChild(this[name].dom);
                            return;
                        }
                Severity: Minor
                Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 55 mins to fix

                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 (Ext.isIE) {
                                            this.bbar.setStyle('position', 'static');
                                            this.bbar.setStyle('position', '');
                                        }
                Severity: Major
                Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 45 mins to fix

                  Function getFrameHeight has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                      getFrameHeight : function() {
                          var h  = this.el.getFrameWidth('tb') + this.bwrap.getFrameWidth('tb');
                          h += (this.tbar ? this.tbar.getHeight() : 0) +
                               (this.bbar ? this.bbar.getHeight() : 0);
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 45 mins to fix

                  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 createGhost has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      createGhost : function(cls, useShim, appendTo){
                          var el = document.createElement('div');
                          el.className = 'x-panel-ghost ' + (cls ? cls : '');
                          if(this.header){
                              el.appendChild(this.el.dom.firstChild.cloneNode(true));
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 25 mins to fix

                  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

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      onExpand : function(doAnim, animArg){
                          if(doAnim){
                              this[this.collapseEl].slideIn(this.slideAnchor,
                                      Ext.apply(this.createEffect(animArg||true, this.afterExpand, this),
                                          this.expandDefaults));
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 3 hrs to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1367..1376

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 114.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      onCollapse : function(doAnim, animArg){
                          if(doAnim){
                              this[this.collapseEl].slideOut(this.slideAnchor,
                                      Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this),
                                          this.collapseDefaults));
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 3 hrs to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1415..1424

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 114.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      onEnable : function(){
                          if(this.rendered && this.maskDisabled){
                              this.el.unmask();
                          }
                          Ext.Panel.superclass.onEnable.call(this);
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1452..1457

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 68.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      onDisable : function(){
                          if(this.rendered && this.maskDisabled){
                              this.el.mask();
                          }
                          Ext.Panel.superclass.onDisable.call(this);
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1460..1465

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 68.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      onHide : function(){
                          if(this.floating){
                              return this.el.hide();
                          }
                          Ext.Panel.superclass.onHide.call(this);
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1226..1231

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 60.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                      onShow : function(){
                          if(this.floating){
                              return this.el.show();
                          }
                          Ext.Panel.superclass.onShow.call(this);
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 1 hr to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1234..1239

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 60.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if(this.tbar && this.topToolbar){
                              this.topToolbar.ownerCt = this;
                              this.topToolbar.render(this.tbar);
                          }
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 55 mins to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1047..1050

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 53.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          h += (this.tbar ? this.tbar.getHeight() : 0) +
                               (this.bbar ? this.bbar.getHeight() : 0);
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 55 mins to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1600..1601

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 53.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if(this.bbar && this.bottomToolbar){
                              this.bottomToolbar.ownerCt = this;
                              this.bottomToolbar.render(this.bbar);
                          }
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 55 mins to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1043..1046

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 53.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                              h += (this.header ? this.header.getHeight() : 0) +
                                  (this.footer ? this.footer.getHeight() : 0);
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 55 mins to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 1594..1595

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 53.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if(this.bbar){
                              this.elements += ',bbar';
                              this.bottomToolbar = this.createToolbar(this.bbar);
                              this.bbar = null;
                          }
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 40 mins to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 783..788

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 49.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 2 locations. Consider refactoring.
                  Open

                          if(this.tbar){
                              this.elements += ',tbar';
                              this.topToolbar = this.createToolbar(this.tbar);
                              this.tbar = null;
                  
                  
                  Severity: Minor
                  Found in app/assets/javascripts/ext/src/widgets/Panel.js and 1 other location - About 40 mins to fix
                  app/assets/javascripts/ext/src/widgets/Panel.js on lines 789..793

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 49.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  There are no issues that match your filters.

                  Category
                  Status