preston/bittorious

View on GitHub
lib/assets/bower_components/angular-animate/angular-animate.js

Summary

Maintainability
F
1 mo
Test Coverage

File angular-animate.js has 2040 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * @license AngularJS v1.4.3
 * (c) 2010-2015 Google, Inc. http://angularjs.org
 * License: MIT
 */
Severity: Major
Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 5 days to fix

    Function $$AnimateQueueProvider has 411 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
      var PRE_DIGEST_STATE = 1;
      var RUNNING_STATE = 2;
    
      var rules = this.rules = {
    Severity: Major
    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 2 days to fix

      Function $AnimateCssProvider has 398 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var $AnimateCssProvider = ['$animateProvider', function($animateProvider) {
        var gcsLookup = createLocalCacheLookup();
        var gcsStaggerLookup = createLocalCacheLookup();
      
        this.$get = ['$window', '$$jqLite', '$$AnimateRunner', '$timeout',
      Severity: Major
      Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

        Function $get has 391 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

               function($window,   $$jqLite,   $$AnimateRunner,   $timeout,
                        $document,   $sniffer,   $$rAFScheduler) {
        
            var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
        
        
        Severity: Major
        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

          Function $get has 365 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                 function($$rAF,   $rootScope,   $rootElement,   $document,   $$HashMap,
                          $$animation,   $$AnimateRunner,   $templateRequest,   $$jqLite) {
          
              var activeAnimationsLookup = new $$HashMap();
              var disabledElementsLookup = new $$HashMap();
          Severity: Major
          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

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

                function init(element, options) {
                  var node = getDomNode(element);
                  if (!node || !node.parentNode) {
                    return closeAndReturnNoopAnimator();
                  }
            Severity: Major
            Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

              Function $$AnimationProvider has 254 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var $$AnimationProvider = ['$animateProvider', function($animateProvider) {
                var NG_ANIMATE_REF_ATTR = 'ng-animate-ref';
              
                var drivers = this.drivers = [];
              
              
              Severity: Major
              Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

                Function $get has 239 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                       function($$jqLite,   $rootScope,   $injector,   $$AnimateRunner,   $$rAFScheduler) {
                
                    var animationQueue = [];
                    var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
                
                
                Severity: Major
                Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

                  Function $$AnimateJsProvider has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  var $$AnimateJsProvider = ['$animateProvider', function($animateProvider) {
                    this.$get = ['$injector', '$$AnimateRunner', '$$rAFMutex', '$$jqLite',
                         function($injector,   $$AnimateRunner,   $$rAFMutex,   $$jqLite) {
                  
                      var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
                  Severity: Major
                  Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

                    Function $get has 200 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                           function($injector,   $$AnimateRunner,   $$rAFMutex,   $$jqLite) {
                    
                        var applyAnimationClasses = applyAnimationClassesFactory($$jqLite);
                             // $animateJs(element, 'enter');
                        return function(element, event, classes, options) {
                    Severity: Major
                    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 day to fix

                      Function $$AnimateCssDriverProvider has 180 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      var $$AnimateCssDriverProvider = ['$$animationProvider', function($$animationProvider) {
                        $$animationProvider.drivers.push('$$animateCssDriver');
                      
                        var NG_ANIMATE_SHIM_CLASS_NAME = 'ng-animate-shim';
                        var NG_ANIMATE_ANCHOR_CLASS_NAME = 'ng-anchor';
                      Severity: Major
                      Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 7 hrs to fix

                        Function $get has 172 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                               function($animateCss,   $rootScope,   $$AnimateRunner,   $rootElement,   $document,   $sniffer) {
                        
                            // only browsers that support these properties can render animations
                            if (!$sniffer.animations && !$sniffer.transitions) return noop;
                        
                        
                        Severity: Major
                        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 6 hrs to fix

                          Function queueAnimation has 155 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function queueAnimation(element, event, options) {
                                var node, parent;
                                element = stripCommentsFromElement(element);
                                if (element) {
                                  node = getDomNode(element);
                          Severity: Major
                          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 6 hrs to fix

                            Function start has 119 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                  function start() {
                                    if (animationClosed) return;
                                    if (!node.parentNode) {
                                      close();
                                      return;
                            Severity: Major
                            Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 4 hrs to fix

                              Function $$AnimateRunnerFactory has 114 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              var $$AnimateRunnerFactory = ['$q', '$$rAFMutex', function($q, $$rAFMutex) {
                                var INITIAL_STATE = 0;
                                var DONE_PENDING_STATE = 1;
                                var DONE_COMPLETE_STATE = 2;
                              
                              
                              Severity: Major
                              Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 4 hrs to fix

                                Function prepareAnchoredAnimation has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    function prepareAnchoredAnimation(classes, outAnchor, inAnchor) {
                                      var clone = jqLite(getDomNode(outAnchor).cloneNode(true));
                                      var startingClasses = filterCssClasses(getClassVal(clone));
                                
                                      outAnchor.addClass(NG_ANIMATE_SHIM_CLASS_NAME);
                                Severity: Major
                                Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 3 hrs to fix

                                  Function triggerAnimationStart has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          function triggerAnimationStart() {
                                            // just incase a stagger animation kicks in when the animation
                                            // itself was cancelled entirely
                                            if (animationClosed) return;
                                  
                                  
                                  Severity: Major
                                  Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 2 hrs to fix

                                    Function groupAnimations has 67 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                          function groupAnimations(animations) {
                                            var preparedAnimations = [];
                                            var refLookup = {};
                                            forEach(animations, function(animation, index) {
                                              var element = animation.element;
                                    Severity: Major
                                    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 2 hrs to fix

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

                                      var $$AnimateJsDriverProvider = ['$$animationProvider', function($$animationProvider) {
                                        $$animationProvider.drivers.push('$$animateJsDriver');
                                        this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
                                          return function initDriverFn(animationDetails) {
                                            if (animationDetails.from && animationDetails.to) {
                                      Severity: Minor
                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                        Function resolveElementClasses has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function resolveElementClasses(existing, toAdd, toRemove) {
                                          var ADD_CLASS = 1;
                                          var REMOVE_CLASS = -1;
                                        
                                          var flags = {};
                                        Severity: Minor
                                        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

                                                  start: function() {
                                                    var closeActiveAnimations;
                                                    var chain = [];
                                          
                                                    if (before) {
                                          Severity: Minor
                                          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

                                                function areAnimationsAllowed(element, parentElement, event) {
                                                  var bodyElementDetected = false;
                                                  var rootElementDetected = false;
                                                  var parentAnimationDetected = false;
                                                  var animateChildren;
                                            Severity: Minor
                                            Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

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

                                                this.$get = ['$$animateJs', '$$AnimateRunner', function($$animateJs, $$AnimateRunner) {
                                                  return function initDriverFn(animationDetails) {
                                                    if (animationDetails.from && animationDetails.to) {
                                                      var fromAnimation = prepareAnimation(animationDetails.from);
                                                      var toAnimation = prepareAnimation(animationDetails.to);
                                              Severity: Minor
                                              Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                Function prepareFromToAnchorAnimation has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                                Open

                                                    function prepareFromToAnchorAnimation(from, to, classes, anchors) {
                                                      var fromAnimation = prepareRegularAnimation(from);
                                                      var toAnimation = prepareRegularAnimation(to);
                                                
                                                      var anchorAnimations = [];
                                                Severity: Minor
                                                Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                  Function $$rAFSchedulerFactory has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                                  Open

                                                  var $$rAFSchedulerFactory = ['$$rAF', function($$rAF) {
                                                    var tickQueue = [];
                                                    var cancelFn;
                                                  
                                                    function scheduler(tasks) {
                                                  Severity: Minor
                                                  Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                    Function initDriverFn has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                                    Open

                                                        return function initDriverFn(animationDetails) {
                                                          if (animationDetails.from && animationDetails.to) {
                                                            var fromAnimation = prepareAnimation(animationDetails.from);
                                                            var toAnimation = prepareAnimation(animationDetails.to);
                                                            if (!fromAnimation && !toAnimation) return;
                                                    Severity: Minor
                                                    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                      Function packageAnimations has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                                      Open

                                                            function packageAnimations(element, event, options, animations, fnName) {
                                                              var operations = groupEventedAnimations(element, event, options, animations, fnName);
                                                              if (operations.length === 0) {
                                                                var a,b;
                                                                if (fnName === 'beforeSetClass') {
                                                      Severity: Minor
                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                        Function executeAnimationFn has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                        Open

                                                              function executeAnimationFn(fn, element, event, options, onDone) {
                                                                var args;
                                                                switch (event) {
                                                                  case 'animate':
                                                                    args = [element, options.from, options.to, onDone];
                                                        Severity: Minor
                                                        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                          Function groupEventedAnimations has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                                          Open

                                                                function groupEventedAnimations(element, event, options, animations, fnName) {
                                                                  var operations = [];
                                                                  forEach(animations, function(ani) {
                                                                    var animation = ani[fnName];
                                                                    if (!animation) return;
                                                          Severity: Minor
                                                          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                            Function start has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                                            Open

                                                                    start: function() {
                                                                      var runner;
                                                            
                                                                      var currentAnimation = startingAnimator.start();
                                                                      currentAnimation.done(function() {
                                                            Severity: Minor
                                                            Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                              Function $get has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                                              Open

                                                                     function($$rAF,   $rootScope,   $rootElement,   $document,   $$HashMap,
                                                                              $$animation,   $$AnimateRunner,   $templateRequest,   $$jqLite) {
                                                              Severity: Major
                                                              Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 1 hr to fix

                                                                Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
                                                                Open

                                                                       function($window,   $$jqLite,   $$AnimateRunner,   $timeout,
                                                                                $document,   $sniffer,   $$rAFScheduler) {
                                                                Severity: Major
                                                                Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 50 mins to fix

                                                                  Function $get has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                                                  Open

                                                                         function($animateCss,   $rootScope,   $$AnimateRunner,   $rootElement,   $document,   $sniffer) {
                                                                  Severity: Minor
                                                                  Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 45 mins to fix

                                                                    Function groupEventedAnimations has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                    Open

                                                                          function groupEventedAnimations(element, event, options, animations, fnName) {
                                                                    Severity: Minor
                                                                    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix

                                                                      Function executeAnimationFn has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                      Open

                                                                            function executeAnimationFn(fn, element, event, options, onDone) {
                                                                      Severity: Minor
                                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix

                                                                        Function packageAnimations has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                        Open

                                                                              function packageAnimations(element, event, options, animations, fnName) {
                                                                        Severity: Minor
                                                                        Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix

                                                                          Function $get has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                                          Open

                                                                                 function($$jqLite,   $rootScope,   $injector,   $$AnimateRunner,   $$rAFScheduler) {
                                                                          Severity: Minor
                                                                          Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 35 mins to fix

                                                                            Avoid too many return statements within this function.
                                                                            Open

                                                                                        return existingAnimation.runner;
                                                                            Severity: Major
                                                                            Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 30 mins to fix

                                                                              Avoid too many return statements within this function.
                                                                              Open

                                                                                            return runner;
                                                                              Severity: Major
                                                                              Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 30 mins to fix

                                                                                Avoid too many return statements within this function.
                                                                                Open

                                                                                      return runner;
                                                                                Severity: Major
                                                                                Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 30 mins to fix

                                                                                  Avoid too many return statements within this function.
                                                                                  Open

                                                                                        return {
                                                                                          $$willAnimate: true,
                                                                                          end: endFn,
                                                                                          start: function() {
                                                                                            if (animationClosed) return;
                                                                                  Severity: Major
                                                                                  Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 30 mins to fix

                                                                                    Avoid too many return statements within this function.
                                                                                    Open

                                                                                            return runner;
                                                                                    Severity: Major
                                                                                    Found in lib/assets/bower_components/angular-animate/angular-animate.js - About 30 mins to fix

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

                                                                                                  if (flags.hasTransitions) {
                                                                                                    easeProp = TRANSITION_PROP + TIMING_KEY;
                                                                                                    temporaryStyles.push([easeProp, easeVal]);
                                                                                                    node.style[easeProp] = easeVal;
                                                                                                  }
                                                                                      Severity: Minor
                                                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 50 mins to fix
                                                                                      lib/assets/bower_components/angular-animate/angular-animate.js on lines 1238..1242

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

                                                                                      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 (flags.hasAnimations) {
                                                                                                    easeProp = ANIMATION_PROP + TIMING_KEY;
                                                                                                    temporaryStyles.push([easeProp, easeVal]);
                                                                                                    node.style[easeProp] = easeVal;
                                                                                                  }
                                                                                      Severity: Minor
                                                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 50 mins to fix
                                                                                      lib/assets/bower_components/angular-animate/angular-animate.js on lines 1233..1237

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

                                                                                      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

                                                                                          cancel: function() {
                                                                                            if (this.host.cancel) {
                                                                                              this.host.cancel();
                                                                                            }
                                                                                            this._resolve(false);
                                                                                      Severity: Minor
                                                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 45 mins to fix
                                                                                      lib/assets/bower_components/angular-animate/angular-animate.js on lines 2586..2591

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

                                                                                      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

                                                                                          end: function() {
                                                                                            if (this.host.end) {
                                                                                              this.host.end();
                                                                                            }
                                                                                            this._resolve(true);
                                                                                      Severity: Minor
                                                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 45 mins to fix
                                                                                      lib/assets/bower_components/angular-animate/angular-animate.js on lines 2593..2598

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

                                                                                      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

                                                                                      function applyAnimationToStyles(element, options) {
                                                                                        if (options.to) {
                                                                                          element.css(options.to);
                                                                                          options.to = null;
                                                                                        }
                                                                                      Severity: Minor
                                                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 35 mins to fix
                                                                                      lib/assets/bower_components/angular-animate/angular-animate.js on lines 161..166

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

                                                                                      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

                                                                                      function applyAnimationFromStyles(element, options) {
                                                                                        if (options.from) {
                                                                                          element.css(options.from);
                                                                                          options.from = null;
                                                                                        }
                                                                                      Severity: Minor
                                                                                      Found in lib/assets/bower_components/angular-animate/angular-animate.js and 1 other location - About 35 mins to fix
                                                                                      lib/assets/bower_components/angular-animate/angular-animate.js on lines 168..173

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

                                                                                      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