devstaff-crete/DevStaff-Heraklion

View on GitHub
meetups/meetup06-MobileDev/x-platform/ionic/js/angular/angular-resource.js

Summary

Maintainability
D
2 days
Test Coverage

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

    this.$get = ['$http', '$q', function($http, $q) {

      var noop = angular.noop,
        forEach = angular.forEach,
        extend = angular.extend,

    Function resourceFactory has 133 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          function resourceFactory(url, paramDefaults, actions, options) {
            var route = new Route(url, options);
    
            actions = extend({}, provider.defaults.actions, actions);
    
    

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

                Resource[name] = function(a1, a2, a3, a4) {
                  var params = {}, data, success, error;
      
                  /* jshint -W086 */ /* (purposefully fall through case statements) */
                  switch (arguments.length) {

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

        /**
         * @license AngularJS v1.4.3
         * (c) 2010-2015 Google, Inc. http://angularjs.org
         * License: MIT
         */

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

                  setUrlParams: function(config, params, actionUrl) {
                    var self = this,
                      url = actionUrl || self.template,
                      val,
                      encodedVal;

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

                        var promise = $http(httpConfig).then(function(response) {
                          var data = response.data,
                            promise = value.$promise;
            
                          if (data) {

              There are no issues that match your filters.

              Category
              Status