radify/angular-model

View on GitHub

Showing 4 of 4 total issues

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

/**
 * AngularJS API Domain Model Service
 *
 * {@copyright 2015, Radify, Inc (http://radify.io/)}
 * {@link https://github.com/radify/angular-model#readme}
Severity: Minor
Found in src/angular-model.js - About 3 hrs to fix

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

      function $request(object, model, method, data, headers) {
        var writeMethods = ['POST', 'PUT', 'PATCH'];
        var defaultHeaders = {'Content-Type': 'application/json;charset=UTF-8'};
        var isWrite = writeMethods.indexOf(method) > -1;
        headers = extend({}, isWrite ? defaultHeaders : {}, headers);
    Severity: Minor
    Found in src/angular-model.js - About 1 hr to fix

      Avoid deeply nested control flow statements.
      Open

              if (lisObject(item)) {
                dst[prop].push(deepExtend({}, item));
              } else if (isArray(item)) {
                dst[prop].push(deepExtend([], item));
              } else {
      Severity: Major
      Found in src/angular-model.js - About 45 mins to fix

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

          function $request(object, model, method, data, headers) {
        Severity: Minor
        Found in src/angular-model.js - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language