jakubrohleder/angular-jsonapi

View on GitHub

Showing 61 of 126 total issues

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

      function resolved(results) {
        _this.state[action] = _this.state[action] || {};
        _this.state[action].success = true;

        angular.forEach(results, function(result) {
Severity: Minor
Found in src/synchronizers/synchronizer-simple.factory.js - About 1 hr to fix

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

          function removeReflectionLink(reflectionKey, target) {
            var reflectionSchema = target.schema.relationships[reflectionKey];
            var config = {
              action: 'unlinkReflection',
              object: target,
    Severity: Minor
    Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

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

          AngularJsonAPIModelSourceError,
          AngularJsonAPIModelValidationError,
          AngularJsonAPIModelErrorsManager,
          AngularJsonAPIModelLinkerService,
          AngularJsonAPIModelForm,
      Severity: Major
      Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

        Function resolve has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              function resolve(response) {
                var results = $jsonapi.__proccesResults(response.data);
                $rootScope.$emit('angularJsonAPI:' + _this.type + ':collection:fetch', 'resolved', _this, response);
                $q.allSettled(results.included.map(synchronizeIncluded)).then(resolveIncluded, deferred.reject);
        
        
        Severity: Minor
        Found in src/collection/collection.factory.js - About 1 hr to fix

          Function AngularJsonAPIModel has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function AngularJsonAPIModel(
              AngularJsonAPIAbstractModel,
              AngularJsonAPISchema,
              namedFunction,
              pluralize,
          Severity: Minor
          Found in src/model/model-factory.factory.js - About 1 hr to fix

            Function setRelationships has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  function setRelationships(schema, key) {
                    var relationshipData = validatedData.relationships[key];
            
                    if (relationshipData === undefined) {
                      if (object.data.relationships[key] === undefined) {
            Severity: Minor
            Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

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

                function decorator($delegate) {
                  var $q = $delegate;
              
                  $q.allSettled = $q.allSettled || allSettled;
              
              
              Severity: Minor
              Found in src/utils/all-settled.js - About 1 hr to fix

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

                      function __proccesResults(results) {
                        var objects = {
                          data: [],
                          included: []
                        };
                Severity: Minor
                Found in src/jsonapi.provider.js - About 1 hr to fix

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

                        function resolve(response) {
                          $rootScope.$emit('angularJsonAPI:' + _this.data.type + ':object:link', 'resolved', _this, response);
                  
                          var targets = AngularJsonAPIModelLinkerService.link(_this, key, target);
                  
                  
                  Severity: Minor
                  Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

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

                          function resolve(response) {
                            $rootScope.$emit('angularJsonAPI:' + _this.data.type + ':object:unlink', 'resolved', _this, response);
                    
                            var targets = AngularJsonAPIModelLinkerService.link(_this, key, target);
                    
                    
                    Severity: Minor
                    Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

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

                          AngularJsonAPIModelSourceError,
                          AngularJsonAPISourcePrototype,
                          AngularJsonAPIModelLinkerService,
                          pluralize,
                          Parse,
                      Severity: Major
                      Found in src/sources/parse/source-parse.factory.js - About 50 mins to fix

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

                            AngularJsonAPIModel,
                            AngularJsonAPISchema,
                            AngularJsonAPIResourceCache,
                            AngularJsonAPICollection,
                            $rootScope,
                        Severity: Major
                        Found in src/resource/resource.factory.js - About 50 mins to fix

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

                              AngularJsonAPIModelSourceError,
                              AngularJsonAPISourcePrototype,
                              AngularJsonAPIModelLinkerService,
                              toKebabCase,
                              $q,
                          Severity: Minor
                          Found in src/sources/rest/source-rest.factory.js - About 45 mins to fix

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

                                AngularJsonAPIAbstractModel,
                                AngularJsonAPISchema,
                                namedFunction,
                                pluralize,
                                $log
                            Severity: Minor
                            Found in src/model/model-factory.factory.js - About 35 mins to fix

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

                                  function unlink(object, key, target, oneWay, form) {
                              Severity: Minor
                              Found in src/model/model-linker/model-linker.js - About 35 mins to fix

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

                                    function link(object, key, target, oneWay, form) {
                                Severity: Minor
                                Found in src/model/model-linker/model-linker.js - About 35 mins to fix

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

                                      AngularJsonAPIModelSourceError,
                                      AngularJsonAPIModelErrorsManager,
                                      $rootScope,
                                      $injector,
                                      $q
                                  Severity: Minor
                                  Found in src/collection/collection.factory.js - About 35 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                              return [];
                                    Severity: Major
                                    Found in src/model/model-linker/model-linker.js - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                return __processAddHasMany(object, key, target, form);
                                      Severity: Major
                                      Found in src/model/model-linker/model-linker.js - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                                  return __processAddHasOne(object, key, target, form);
                                        Severity: Major
                                        Found in src/model/model-linker/model-linker.js - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language