myems-admin/js/angular/angular-resource.js

Summary

Maintainability
F
4 days
Test Coverage

Function ResourceProvider has 273 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  provider('$resource', function ResourceProvider() {
    var PROTOCOL_AND_IPV6_REGEX = /^https?:\/\/\[[^\]]*][^/]*/;

    var provider = this;

Severity: Major
Found in myems-admin/js/angular/angular-resource.js - About 1 day to fix

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

        this.$get = ['$http', '$log', '$q', '$timeout', function($http, $log, $q, $timeout) {
    
          var noop = angular.noop,
              forEach = angular.forEach,
              extend = angular.extend,
    Severity: Major
    Found in myems-admin/js/angular/angular-resource.js - About 1 day to fix

      Function resourceFactory has 181 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);
      
      
      Severity: Major
      Found in myems-admin/js/angular/angular-resource.js - About 7 hrs to fix

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

                  Resource[name] = function(a1, a2, a3, a4) {
                    var params = {}, data, onSuccess, onError;
        
                    switch (arguments.length) {
                      case 4:
        Severity: Major
        Found in myems-admin/js/angular/angular-resource.js - About 5 hrs to fix

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

          /**
           * @license AngularJS v1.8.3
           * (c) 2010-2020 Google LLC. http://angularjs.org
           * License: MIT
           */
          Severity: Minor
          Found in myems-admin/js/angular/angular-resource.js - About 3 hrs to fix

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

                    setUrlParams: function(config, params, actionUrl) {
                      var self = this,
                        url = actionUrl || self.template,
                        val,
                        encodedVal,
            Severity: Major
            Found in myems-admin/js/angular/angular-resource.js - About 2 hrs to fix

              There are no issues that match your filters.

              Category
              Status