sahat/satellizer

View on GitHub
examples/ionic/www/lib/ionic/js/angular/angular-animate.js

Summary

Maintainability
F
1 wk
Test Coverage

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

/**
 * @license AngularJS v1.3.13
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
Severity: Major
Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 2 days to fix

    Function performAnimation has 171 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
            var noopCancel = noop;
            var runner = animationRunner(element, animationEvent, className, options);
            if (!runner) {
              fireDOMOperation();
    Severity: Major
    Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 6 hrs to fix

      Function animationRunner has 144 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            function animationRunner(element, animationEvent, className, options) {
              //transcluded directives may sometimes fire an animation using only comment nodes
              //best to catch this early on to prevent any animation operations from occurring
              var node = element[0];
              if (!node) {
      Severity: Major
      Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 5 hrs to fix

        Function animateRun has 117 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
                var node = extractElementNode(element);
                var elementData = element.data(NG_ANIMATE_CSS_DATA_KEY);
                if (node.getAttribute('class').indexOf(className) == -1 || !elementData) {
                  activeAnimationComplete();
        Severity: Major
        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 4 hrs to fix

          Function setClass has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  setClass: function(element, add, remove, options) {
                    options = parseAnimateOptions(options);
          
                    var STORAGE_KEY = '$$animateClasses';
                    element = angular.element(element);
          Severity: Major
          Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 2 hrs to fix

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

                  function animateSetup(animationEvent, element, className, styles) {
                    var structural = ['ng-enter','ng-leave','ng-move'].indexOf(className) >= 0;
            
                    var cacheKey = getCacheKey(element);
                    var eventCacheKey = cacheKey + ' ' + className;
            Severity: Minor
            Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

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

                      function run(fns, cancellations, allCompleteFn) {
                        var animations = [];
                        forEach(fns, function(animation) {
                          animation.fn && animations.push(animation);
                        });
              Severity: Minor
              Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

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

                      function getElementAnimationDetails(element, cacheKey) {
                        var data = cacheKey ? lookupCache[cacheKey] : null;
                        if (!data) {
                          var transitionDuration = 0;
                          var transitionDelay = 0;
                Severity: Minor
                Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

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

                        function animationsDisabled(element, parentElement) {
                          if (rootAnimateState.disabled) {
                            return true;
                          }
                  
                  
                  Severity: Minor
                  Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

                    Function closeAnimation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            function closeAnimation() {
                              if (!closeAnimation.hasBeenRun) {
                                if (runner) { //the runner doesn't exist if it fails to instantiate
                                  runner.applyStyles();
                                }
                    Severity: Minor
                    Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

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

                            function resolveElementClasses(element, cache, runningAnimations) {
                              runningAnimations = runningAnimations || {};
                      
                              var lookup = {};
                              forEach(runningAnimations, function(data, selector) {
                      Severity: Minor
                      Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

                        Function performAnimation has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                              function performAnimation(animationEvent, className, element, parentElement, afterElement, domOperation, options, doneCallback) {
                        Severity: Major
                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 1 hr to fix

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

                                  animate: function(element, className, from, to, animationCompleted, options) {
                          Severity: Minor
                          Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 45 mins to fix

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

                                  function animate(animationEvent, element, className, animationComplete, options) {
                            Severity: Minor
                            Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

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

                                    function animateAfter(animationEvent, element, className, afterAnimationComplete, styles) {
                              Severity: Minor
                              Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

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

                                        beforeSetClass: function(element, add, remove, animationCompleted, options) {
                                Severity: Minor
                                Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

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

                                          animate: function(element, from, to, className, options) {
                                  Severity: Minor
                                  Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

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

                                            setClass: function(element, add, remove, animationCompleted, options) {
                                    Severity: Minor
                                    Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

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

                                            function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
                                      Severity: Minor
                                      Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js - About 35 mins to fix

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

                                                beforeRemoveClass: function(element, className, animationCompleted, options) {
                                                  options = options || {};
                                                  var cancellationMethod = animateBefore('removeClass', element, suffixClasses(className, '-remove'), options.from);
                                                  if (cancellationMethod) {
                                                    afterReflow(element, animationCompleted);
                                        Severity: Major
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 2 hrs to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 2082..2091

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

                                        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

                                                beforeAddClass: function(element, className, animationCompleted, options) {
                                                  options = options || {};
                                                  var cancellationMethod = animateBefore('addClass', element, suffixClasses(className, '-add'), options.from);
                                                  if (cancellationMethod) {
                                                    afterReflow(element, animationCompleted);
                                        Severity: Major
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 2 hrs to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 2093..2102

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

                                        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

                                                addClass: function(element, className, animationCompleted, options) {
                                                  options = options || {};
                                                  return animateAfter('addClass', element, suffixClasses(className, '-add'), animationCompleted, options.to);
                                                },
                                        Severity: Minor
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 35 mins to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 2117..2120

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

                                        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

                                                removeClass: function(element, className, animationCompleted, options) {
                                                  options = options || {};
                                                  return animateAfter('removeClass', element, suffixClasses(className, '-remove'), animationCompleted, options.to);
                                                }
                                        Severity: Minor
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 35 mins to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 2112..2115

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

                                        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 (options && options.tempClasses) {
                                                      forEach(options.tempClasses, function(className) {
                                                        $$jqLite.removeClass(element, className);
                                                      });
                                                    }
                                        Severity: Minor
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 30 mins to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 1391..1395

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

                                        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

                                                  after: function(allCompleteFn) {
                                                    afterComplete = allCompleteFn;
                                                    run(after, afterCancel, function() {
                                                      afterComplete = noop;
                                                      allCompleteFn();
                                        Severity: Minor
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 30 mins to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 766..772

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

                                        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

                                                  before: function(allCompleteFn) {
                                                    beforeComplete = allCompleteFn;
                                                    run(before, beforeCancel, function() {
                                                      beforeComplete = noop;
                                                      allCompleteFn();
                                        Severity: Minor
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 30 mins to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 773..779

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

                                        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 (options && options.tempClasses) {
                                                  forEach(options.tempClasses, function(className) {
                                                    $$jqLite.addClass(element, className);
                                                  });
                                                }
                                        Severity: Minor
                                        Found in examples/ionic/www/lib/ionic/js/angular/angular-animate.js and 1 other location - About 30 mins to fix
                                        examples/ionic/www/lib/ionic/js/angular/angular-animate.js on lines 1469..1473

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

                                        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