JohnMunsch/PaperQuik

View on GitHub
app/bower_components/angular-mocks/angular-mocks.js

Summary

Maintainability
F
6 days
Test Coverage

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

/**
 * @license AngularJS v1.2.20
 * (c) 2010-2014 Google, Inc. http://angularjs.org
 * License: MIT
 */
Severity: Major
Found in app/bower_components/angular-mocks/angular-mocks.js - About 2 days to fix

    Function createHttpBackendMock has 141 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function createHttpBackendMock($rootScope, $delegate, $browser) {
      var definitions = [],
          expectations = [],
          responses = [],
          responsesPush = angular.bind(responses, responses.push),
    Severity: Major
    Found in app/bower_components/angular-mocks/angular-mocks.js - About 5 hrs to fix

      Function TzDate has 93 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      angular.mock.TzDate = function (offset, timestamp) {
        var self = new Date(0);
        if (angular.isString(timestamp)) {
          var tsStr = timestamp;
      
      
      Severity: Major
      Found in app/bower_components/angular-mocks/angular-mocks.js - About 3 hrs to fix

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

        angular.mock.$IntervalProvider = function() {
          this.$get = ['$rootScope', '$q',
               function($rootScope,   $q) {
            var repeatFns = [],
                nextRepeatId = 0,
        Severity: Major
        Found in app/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

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

                 function($rootScope,   $q) {
              var repeatFns = [],
                  nextRepeatId = 0,
                  now = 0;
          
          
          Severity: Major
          Found in app/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

            Function $Browser has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            angular.mock.$Browser = function() {
              var self = this;
            
              this.isMock = true;
              self.$$url = "http://server/";
            Severity: Major
            Found in app/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

              Function $httpBackend has 57 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
                  var xhr = new MockXhr(),
                      expectation = expectations[0],
                      wasExpected = false;
              
              
              Severity: Major
              Found in app/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

                Function $LogProvider has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                angular.mock.$LogProvider = function() {
                  var debug = true;
                
                  function concat(array1, array2, index) {
                    return array1.concat(Array.prototype.slice.call(array2, index));
                Severity: Major
                Found in app/bower_components/angular-mocks/angular-mocks.js - About 2 hrs to fix

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

                  angular.mock.dump = function(object) {
                    return serialize(object);
                  
                    function serialize(object) {
                      var out;
                  Severity: Minor
                  Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

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

                      this.$get = function () {
                        var $log = {
                          log: function() { $log.log.logs.push(concat([], arguments, 0)); },
                          warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
                          info: function() { $log.info.logs.push(concat([], arguments, 0)); },
                    Severity: Minor
                    Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

                      Function animate has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        .config(['$provide', function($provide) {
                      
                          var reflowQueue = [];
                          $provide.value('$$animateReflow', function(fn) {
                            var index = reflowQueue.length;
                      Severity: Minor
                      Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

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

                        function MockXhr() {
                        
                          // hack for testing $http, $httpBackend
                          MockXhr.$$lastInstance = this;
                        
                        
                        Severity: Minor
                        Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

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

                              var $interval = function(fn, delay, count, invokeApply) {
                                var deferred = $q.defer(),
                                    promise = deferred.promise,
                                    iteration = 0,
                                    skipApply = (angular.isDefined(invokeApply) && !invokeApply);
                          Severity: Minor
                          Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

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

                            function MockHttpExpectation(method, url, data, headers) {
                            
                              this.data = data;
                              this.headers = headers;
                            
                            
                            Severity: Minor
                            Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

                              Function $ExceptionHandlerProvider has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              angular.mock.$ExceptionHandlerProvider = function() {
                                var handler;
                              
                                /**
                                 * @ngdoc method
                              Severity: Minor
                              Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

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

                                  function serialize(object) {
                                    var out;
                                
                                    if (angular.isElement(object)) {
                                      object = angular.element(object);
                                Severity: Minor
                                Found in app/bower_components/angular-mocks/angular-mocks.js - About 1 hr to fix

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

                                    function $httpBackend(method, url, data, callback, headers, timeout, withCredentials) {
                                  Severity: Major
                                  Found in app/bower_components/angular-mocks/angular-mocks.js - About 50 mins to fix

                                    Consider simplifying this complex logical expression.
                                    Open

                                    if(window.jasmine || window.mocha) {
                                    
                                      var currentSpec = null,
                                          isSpecRunning = function() {
                                            return !!currentSpec;
                                    Severity: Major
                                    Found in app/bower_components/angular-mocks/angular-mocks.js - About 40 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return true;
                                      Severity: Major
                                      Found in app/bower_components/angular-mocks/angular-mocks.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                            return data == d;
                                        Severity: Major
                                        Found in app/bower_components/angular-mocks/angular-mocks.js - About 30 mins to fix

                                          There are no issues that match your filters.

                                          Category
                                          Status