talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Function run has 63 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        run : function(el, args, duration, easing, cb, scope, type){
            var anim = createAnim(cb, scope), e = Ext.fly(el, '_animrun');
            var o = {};
            for(var k in args){
                switch(k){   // jquery doesn't support, so convert
Severity: Major
Found in app/assets/javascripts/ext/src/adapter/jquery-bridge.js - About 2 hrs to fix

    Function Assistant has 63 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    Ext.debug.Assistant = function(){
        var enabled = true;
            
        return {
            enable: function(){
    Severity: Major
    Found in app/assets/javascripts/ext/src/error-checking.js - About 2 hrs to fix

      Function initEvents has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          initEvents: function() {
              this.els.navPrev.on('click', function(ev) {
                  ev.preventDefault();
                  var target = ev.getTarget();
                  target.blur();            
      Severity: Major
      Found in app/assets/javascripts/ext/src/ext-core/examples/carousel/carousel.js - About 2 hrs to fix

        Function run has 63 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                run : function(el, args, duration, easing, cb, scope, type){
                    var anim = createAnim(cb, scope), e = Ext.fly(el, '_animrun');
                    var o = {};
                    for(var k in args){
                        switch(k){   // jquery doesn't support, so convert
        Severity: Major
        Found in app/assets/javascripts/ext/adapter/jquery/ext-jquery-adapter-debug.js - About 2 hrs to fix

          Function execute has 63 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function execute( item , context , thread , callback ) {
              
              var url,
                  length;
              
          Severity: Major
          Found in app/assets/javascripts/lib/dominoes-1.0-rc2.js - About 2 hrs to fix

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

              def create
                I18n.locale = "#{I18n.locale}_signup_create"
            
                if params[:user][:organization_membership_requests_attributes].blank? || params[:user][:organization_membership_requests_attributes]["0"].blank? || params[:user][:organization_membership_requests_attributes]["0"]["organization_id"].blank?
                  params[:user].delete("organization_membership_requests_attributes")
            Severity: Major
            Found in app/controllers/admin/users_controller.rb - About 2 hrs to fix

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

                def build!(start_time=Time.now)
                  raise "Invalid #{self}, Errors: #{self.errors.full_messages.inspect}" unless valid?
              
                  start_at = self.class.format_activation_time(start_time)
                  stop_at =  self.class.format_activation_time(start_time + retry_duration)
              Severity: Major
              Found in app/models/service/tfcc/phone/alert.rb and 2 other locations - About 2 hrs to fix
              app/models/service/tfcc/fax/alert.rb on lines 18..35
              app/models/service/tfcc/sms/alert.rb on lines 21..38

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

              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 3 locations. Consider refactoring.
              Open

                def build!(start_time=Time.now)
                  raise "Invalid #{self}, Errors: #{self.errors.full_messages.inspect}" unless valid?
              
                  start_at = self.class.format_activation_time(start_time)
                  stop_at =  self.class.format_activation_time(start_time + retry_duration)
              Severity: Major
              Found in app/models/service/tfcc/fax/alert.rb and 2 other locations - About 2 hrs to fix
              app/models/service/tfcc/phone/alert.rb on lines 18..35
              app/models/service/tfcc/sms/alert.rb on lines 21..38

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

              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 3 locations. Consider refactoring.
              Open

                def build!(start_time=Time.now)
                  raise "Invalid #{self}, Errors: #{self.errors.full_messages.inspect}" unless valid?
              
                  start_at = self.class.format_activation_time(start_time)
                  stop_at =  self.class.format_activation_time(start_time + retry_duration)
              Severity: Major
              Found in app/models/service/tfcc/sms/alert.rb and 2 other locations - About 2 hrs to fix
              app/models/service/tfcc/fax/alert.rb on lines 18..35
              app/models/service/tfcc/phone/alert.rb on lines 18..35

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

              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

              prototype has 23 functions (exceeds 20 allowed). Consider refactoring.
              Open

              Ext.tree.TreeEventModel.prototype = {
                  initEvents : function(){
                      var t = this.tree;
              
                      if(t.trackMouseOver !== false){
              Severity: Minor
              Found in app/assets/javascripts/ext/src/widgets/tree/TreeEventModel.js - About 2 hrs to fix

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

                        if (this.type == 'hbox') {
                            var innerCtWidth  = width,
                                innerCtHeight = calcs.meta.maxHeight + padding.top + padding.bottom;
                
                            if (align == 'stretch') {
                Severity: Major
                Found in app/assets/javascripts/ext/src/widgets/layout/BoxLayout.js and 1 other location - About 2 hrs to fix
                app/assets/javascripts/ext/src/widgets/layout/BoxLayout.js on lines 205..214

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

                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

                        } else {
                            var innerCtHeight = height,
                                innerCtWidth  = calcs.meta.maxWidth + padding.left + padding.right;
                
                            if (align == 'stretch') {
                Severity: Major
                Found in app/assets/javascripts/ext/src/widgets/layout/BoxLayout.js and 1 other location - About 2 hrs to fix
                app/assets/javascripts/ext/src/widgets/layout/BoxLayout.js on lines 196..205

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

                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

                File ext-lang-cs.js has 270 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: Minor
                Found in app/assets/javascripts/ext/src/locale/ext-lang-cs.js - About 2 hrs to fix

                  Function createParser has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      createParser : function() {
                          var code = [
                              "var dt, y, m, d, h, i, s, ms, o, z, zz, u, v,",
                                  "def = Date.defaults,",
                                  "results = String(input).match(Date.parseRegexes[{0}]);", // either null, or an array of matched strings
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/util/Date.js - About 2 hrs to fix

                    Function curCSS has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        curCSS: function( elem, name, force ) {
                            var ret;
                    
                            // A helper method for determining if an element's values are broken
                            function color( elem ) {
                    Severity: Major
                    Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 2 hrs to fix

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

                          isDirty: function(){
                              //override the behaviour to check sub items.
                              if (this.disabled || !this.rendered) {
                                  return false;
                              }
                      Severity: Major
                      Found in app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js and 1 other location - About 2 hrs to fix
                      app/assets/javascripts/ext/src/widgets/form/CompositeField.js on lines 340..354

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

                      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

                          isDirty: function(){
                              //override the behaviour to check sub items.
                              if (this.disabled || !this.rendered) {
                                  return false;
                              }
                      app/assets/javascripts/ext/src/widgets/form/CheckboxGroup.js on lines 264..280

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

                      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

                              }else{
                                  newSize = this.dragSpecs.startSize +
                                      (this.placement == Ext.SplitBar.TOP ?
                                          endPoint[1] - this.dragSpecs.startPoint[1] :
                                          this.dragSpecs.startPoint[1] - endPoint[1]
                      Severity: Major
                      Found in app/assets/javascripts/ext/src/widgets/SplitBar.js and 1 other location - About 2 hrs to fix
                      app/assets/javascripts/ext/src/widgets/SplitBar.js on lines 187..193

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

                      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.orientation == Ext.SplitBar.HORIZONTAL){
                                  newSize = this.dragSpecs.startSize +
                                      (this.placement == Ext.SplitBar.LEFT ?
                                          endPoint[0] - this.dragSpecs.startPoint[0] :
                                          this.dragSpecs.startPoint[0] - endPoint[0]
                      Severity: Major
                      Found in app/assets/javascripts/ext/src/widgets/SplitBar.js and 1 other location - About 2 hrs to fix
                      app/assets/javascripts/ext/src/widgets/SplitBar.js on lines 193..199

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

                      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

                      Function JSONP has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      Ext.ux.JSONP = (function(){
                          var _queue = [],
                              _current = null,
                              _nextRequest = function() {
                                  _current = null;
                      Severity: Major
                      Found in app/assets/javascripts/ext/src/ext-core/examples/jsonp/jsonp.js - About 2 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language