Showing 61 of 126 total issues
Function unlink
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function unlink(key, target) {
var deferred = $q.defer();
var _this = this;
var error;
var config = {
Function refresh
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function refresh(params) {
var $jsonapi = $injector.get('$jsonapi');
var deferred = $q.defer();
var _this = this;
params = params === undefined ? _this.schema.params.get : params;
Function unlinkAll
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function unlinkAll(key) {
var _this = this;
var deferred = $q.defer();
__incrementLoadingCounter(_this);
Function AngularJsonAPIModelErrorsManagerWrapper
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPIModelErrorsManagerWrapper() {
ErrorsManager.prototype.constructor = ErrorsManager;
ErrorsManager.prototype.concat = concat;
ErrorsManager.prototype.clear = clear;
ErrorsManager.prototype.add = add;
Function fetch
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function fetch() {
var _this = this;
var deferred = $q.defer();
var $jsonapi = $injector.get('$jsonapi');
var config = {
Function AngularJsonAPISchemaWrapper
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPISchemaWrapper(
$log,
pluralize,
uuid4,
AngularJsonAPISchemaLink
Function AngularJsonAPISourceLocal
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPISourceLocal(name, prefix) {
var _this = this;
prefix = prefix || 'AngularJsonAPI';
Function link
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function link(object, key, target, oneWay, form) {
var schema;
form = form === undefined ? false : form;
if (object === undefined) {
Function AngularJsonAPICollection
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPICollection(resource, params) {
var _this = this;
_this.resource = resource;
_this.type = resource.schema.type;
Function AngularJsonAPISchema
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPISchema(schema) {
var _this = this;
var include = schema.include || {};
schema.include = include;
include.get = schema.include.get || [];
Function validate
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validate(key) {
var _this = this;
var attributesWrapper;
var constraintsWrapper;
var deferred = $q.defer();
Function save
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function save() {
var _this = this;
var deferred = $q.defer();
var config = {
action: _this.new === true ? 'add' : 'update',
Function __processAddHasOne
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function __processAddHasOne(object, key, target, form) {
var reflectionKey = object.schema.relationships[key].reflection;
var oldReflection = object.relationships[key];
var reflectionSchema;
var oldReflectionSchema;
Function remove
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function remove() {
var _this = this;
var deferred = $q.defer();
var config = {
Function AngularJsonAPISourcePrototype
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPISourcePrototype(name) {
var _this = this;
var allHooks = [
'add',
'init',
Function AngularJsonAPIAbstractModel
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPIAbstractModel(data, config, updatedAt) {
var _this = this;
data.relationships = data.relationships || {};
Function AngularJsonAPILinkSchrapperLink
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPILinkSchrapperLink($log, pluralize) {
return {
create: AngularJsonAPISchemaLinkFactory
};
Function AngularJsonAPIResource
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function AngularJsonAPIResource(schema, synchronizer) {
var _this = this;
var config = {
action: 'init'
};
Function initialize
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function initialize() {
var _this = this;
var relationships = {};
angular.forEach(_this.schema.relationships, function(relationshipSchema, relationshipName) {
Function unlink
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function unlink(config) {
var deferred = $q.defer();
var schema = config.object.schema.relationships[config.key];
if (config.object.removed === true) {