jakubrohleder/angular-jsonapi

View on GitHub

Showing 61 of 126 total issues

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

    function unlink(key, target) {
      var deferred = $q.defer();
      var _this = this;
      var error;
      var config = {
Severity: Major
Found in src/model/abstract-model/abstract-model.js - About 2 hrs to fix

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

        function refresh(params) {
          var $jsonapi = $injector.get('$jsonapi');
          var deferred = $q.defer();
          var _this = this;
          params = params === undefined ? _this.schema.params.get : params;
    Severity: Major
    Found in src/model/abstract-model/abstract-model.js - About 2 hrs to fix

      Function unlinkAll has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function unlinkAll(key) {
            var _this = this;
            var deferred = $q.defer();
      
            __incrementLoadingCounter(_this);
      Severity: Major
      Found in src/model/abstract-model/abstract-model.js - About 2 hrs to fix

        Function AngularJsonAPIModelErrorsManagerWrapper has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function AngularJsonAPIModelErrorsManagerWrapper() {
            ErrorsManager.prototype.constructor = ErrorsManager;
            ErrorsManager.prototype.concat = concat;
            ErrorsManager.prototype.clear = clear;
            ErrorsManager.prototype.add = add;
        Severity: Major
        Found in src/errors/errors-manager/errors-manager.factory.js - About 2 hrs to fix

          Function fetch has 54 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function fetch() {
                var _this = this;
                var deferred = $q.defer();
                var $jsonapi = $injector.get('$jsonapi');
                var config = {
          Severity: Major
          Found in src/collection/collection.factory.js - About 2 hrs to fix

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

              function AngularJsonAPISchemaWrapper(
                $log,
                pluralize,
                uuid4,
                AngularJsonAPISchemaLink
            Severity: Major
            Found in src/schema/schema.factory.js - About 2 hrs to fix

              Function AngularJsonAPISourceLocal has 49 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function AngularJsonAPISourceLocal(name, prefix) {
                    var _this = this;
              
                    prefix = prefix || 'AngularJsonAPI';
              
              
              Severity: Minor
              Found in src/sources/local/source-local.factory.js - About 1 hr to fix

                Function link has 49 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function link(object, key, target, oneWay, form) {
                      var schema;
                      form = form === undefined ? false : form;
                
                      if (object === undefined) {
                Severity: Minor
                Found in src/model/model-linker/model-linker.js - About 1 hr to fix

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

                      function AngularJsonAPICollection(resource, params) {
                        var _this = this;
                  
                        _this.resource = resource;
                        _this.type = resource.schema.type;
                  Severity: Minor
                  Found in src/collection/collection.factory.js - About 1 hr to fix

                    Function AngularJsonAPISchema has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function AngularJsonAPISchema(schema) {
                          var _this = this;
                          var include = schema.include || {};
                          schema.include = include;
                          include.get = schema.include.get || [];
                    Severity: Minor
                    Found in src/schema/schema.factory.js - About 1 hr to fix

                      Function validate has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function validate(key) {
                            var _this = this;
                            var attributesWrapper;
                            var constraintsWrapper;
                            var deferred = $q.defer();
                      Severity: Minor
                      Found in src/model/model-form/model-form.factory.js - About 1 hr to fix

                        Function save has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function save() {
                              var _this = this;
                              var deferred = $q.defer();
                              var config = {
                                action: _this.new === true ? 'add' : 'update',
                        Severity: Minor
                        Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

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

                              function __processAddHasOne(object, key, target, form) {
                                var reflectionKey = object.schema.relationships[key].reflection;
                                var oldReflection = object.relationships[key];
                                var reflectionSchema;
                                var oldReflectionSchema;
                          Severity: Minor
                          Found in src/model/model-linker/model-linker.js - About 1 hr to fix

                            Function remove has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function remove() {
                                  var _this = this;
                                  var deferred = $q.defer();
                            
                                  var config = {
                            Severity: Minor
                            Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

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

                                  function AngularJsonAPISourcePrototype(name) {
                                    var _this = this;
                                    var allHooks = [
                                      'add',
                                      'init',
                              Severity: Minor
                              Found in src/sources/source-prototype.js - About 1 hr to fix

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

                                    function AngularJsonAPIAbstractModel(data, config, updatedAt) {
                                      var _this = this;
                                
                                      data.relationships = data.relationships || {};
                                
                                
                                Severity: Minor
                                Found in src/model/abstract-model/abstract-model.js - About 1 hr to fix

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

                                    function AngularJsonAPILinkSchrapperLink($log, pluralize) {
                                  
                                      return {
                                        create: AngularJsonAPISchemaLinkFactory
                                      };
                                  Severity: Minor
                                  Found in src/schema/schema-link.factory.js - About 1 hr to fix

                                    Function AngularJsonAPIResource has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        function AngularJsonAPIResource(schema, synchronizer) {
                                          var _this = this;
                                          var config = {
                                            action: 'init'
                                          };
                                    Severity: Minor
                                    Found in src/resource/resource.factory.js - About 1 hr to fix

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

                                          function initialize() {
                                            var _this = this;
                                            var relationships = {};
                                      
                                            angular.forEach(_this.schema.relationships, function(relationshipSchema, relationshipName) {
                                      Severity: Minor
                                      Found in src/resource/resource.factory.js - About 1 hr to fix

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

                                              function unlink(config) {
                                                var deferred = $q.defer();
                                                var schema = config.object.schema.relationships[config.key];
                                        
                                                if (config.object.removed === true) {
                                        Severity: Minor
                                        Found in src/sources/rest/source-rest.factory.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language