talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function onRender has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    onRender : function(ct, position){
        if(!ct){
            ct = Ext.getBody();
        }

Severity: Minor
Found in app/assets/javascripts/ext/src/widgets/menu/Menu.js - About 1 hr to fix

    Function walkCells has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        walkCells : function(row, col, step, fn, scope){
            var cm    = this.colModel,
                clen  = cm.getColumnCount(),
                ds    = this.store,
                rlen  = ds.getCount(),
    Severity: Minor
    Found in app/assets/javascripts/ext/src/widgets/grid/GridPanel.js - About 1 hr to fix

      Function getStyle has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              getStyle : function(){
                  return view && view.getComputedStyle ?
                      function(prop){
                          var el = this.dom,
                              v,
      Severity: Minor
      Found in app/assets/javascripts/ext/src/ext-core/src/core/Element.style.js - About 1 hr to fix

        Function init has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            ,init:function(grid) {
                this.grid = grid;
                
                // the actions column must have an id for Ext 3.x
                this.id = this.id || Ext.id();
        Severity: Minor
        Found in app/assets/javascripts/ext_extensions/Ext.ux.grid.RowActions.js - About 1 hr to fix

          Function startEditing has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              startEditing: function(rowIndex, doFocus){
                  if(this.editing && this.isDirty()){
                      this.showTooltip(this.commitChangesText);
                      return;
                  }
          Severity: Minor
          Found in app/assets/javascripts/ext_extensions/RowEditor.js - About 1 hr to fix

            Method create has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              def create
                if request.post?
                  if request.xhr?
                    user_list = JSON.parse(params[:user_batch][:users])
                    params[:user_batch].delete(:users)
            Severity: Minor
            Found in app/controllers/admin/user_batch_controller.rb - About 1 hr to fix

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

                def add_recipients(xml)
                  xml.swn(:rcpts) do
                    message.Recipients.each do |recipient|
                      xml.swn(:rcpt) do
                        xml.swn(:id, recipient.id)
              Severity: Major
              Found in app/models/service/swn/email/message.rb and 1 other location - About 1 hr to fix
              app/models/service/swn/phone/message.rb on lines 118..130

              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 69.

              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

                def add_recipients(xml)
                  xml.swn(:rcpts) do
                    message.Recipients.each do |recipient|
                      xml.swn(:rcpt) do
                        xml.swn(:id, recipient.id)
              Severity: Major
              Found in app/models/service/swn/phone/message.rb and 1 other location - About 1 hr to fix
              app/models/service/swn/email/message.rb on lines 117..129

              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 69.

              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

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

                        dataTip: {
                          padding: 5, 
                          border: {color: 0x99bbe8, size:1},
                          background: {color: 0xDAE7F6, alpha: .9},
                          font: {name: 'Tahoma', color: 0x15428B, size: 10, bold: true}
              Severity: Major
              Found in app/assets/javascripts/ext_extensions/FlashGraph.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/ext/src/widgets/chart/Chart.js on lines 38..54

              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 69.

              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

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

                  onItemDisabled : function(item){
                      var el = this.getTabEl(item);
                      if(el){
                          Ext.fly(el).addClass('x-item-disabled');
                      }
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/TabPanel.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/ext_extensions/VerticalTabPanel/Ext.ux.tot2ivn.VrTabPanel.js on lines 491..497

              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 69.

              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

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

                      dataTip: {
                          padding: 5,
                          border: {
                              color: 0x99bbe8,
                              size:1
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/chart/Chart.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/ext_extensions/FlashGraph.js on lines 18..23

              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 69.

              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

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

                  onItemDisabled : function(item){
                      var el = this.getTabEl(item);
                      if(el){
                          Ext.fly(el).addClass('x-item-disabled');
                      }
              app/assets/javascripts/ext/src/widgets/TabPanel.js on lines 648..654

              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 69.

              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

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

                load_fail_cb: function(response, options){
                  this.getPanel().loadMask.hide();
                  Ext.Msg.alert('Error loading user info', 'Status:' + response.status + ': ' + response.statusText);
                },
              Severity: Major
              Found in app/assets/javascripts/invitations/NewInvitationBase.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/profile/ProfileBase.js on lines 64..67

              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 69.

              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

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

                load_fail_cb: function(response, options){
                  this.getPanel().loadMask.hide();
                  Ext.Msg.alert('Error loading user info', 'Status:' + response.status + ': ' + response.statusText);
                },
              Severity: Major
              Found in app/assets/javascripts/profile/ProfileBase.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/invitations/NewInvitationBase.js on lines 62..65

              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 69.

              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

                  handleError: function( s, xhr, status, e ) {
                      // If a local callback was specified, fire it
                      if ( s.error ) s.error( xhr, status, e );
              
                      // Fire the global callback
              Severity: Major
              Found in app/assets/javascripts/jquery.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 2780..2787

              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 69.

              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(){
                      Ext.form.TextField.superclass.onEnable.call(this);
                      if(Ext.isIE){
                          this.el.dom.unselectable = '';
                      }
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/form/TextField.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/ext/src/widgets/form/TextField.js on lines 264..269

              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 69.

              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(s.orientation == Ext.SplitBar.HORIZONTAL){
                          if(!s.animate){
                              s.resizingEl.setWidth(newSize);
                              if(onComplete){
                                  onComplete(s, newSize);
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/SplitBar.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/ext/src/widgets/SplitBar.js on lines 337..347

              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 69.

              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

                  this.dv = new Ext.DataView(
                    {name: 'user[org_desc]', store: this.store, tpl: template, emptyText: 'No organizations to display', deferEmptyText: false,
                      multiSelect: false, singleSelect: false, itemSelector: 'li.org-item', selectedClass: 'device-selected'}
                  );
              Severity: Major
              Found in app/assets/javascripts/profile/OrganizationsControl.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/profile/DevicesControl.js on lines 110..113

              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 69.

              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(){
                      Ext.form.TextField.superclass.onDisable.call(this);
                      if(Ext.isIE){
                          this.el.dom.unselectable = 'on';
                      }
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/form/TextField.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/ext/src/widgets/form/TextField.js on lines 272..277

              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 69.

              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

                  handleError: function( s, xml, status, e ) {
                      // If a local callback was specified, fire it
                      if ( s.error ) s.error( xml, status, e );
              
                      // Fire the global callback
              Severity: Major
              Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 1 hr to fix
              app/assets/javascripts/jquery.js on lines 3670..3677

              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 69.

              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

              Severity
              Category
              Status
              Source
              Language