Showing 24 of 33 total issues
Function exports
has 191 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('bower.json'),
Function exports
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
// Base path, that will be used to resolve files and exclude
basePath: '',
Function Builder
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Builder(_baseDsl) {
var mappings = [
{ fun: 'attrDefault', sign: ['init'] },
{ fun: 'attrMask', sign: ['ignore'] },
Function $save
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$save: function(_patch) {
return this.$action(function() {
var url = this.$url('update'), request;
if(url) {
Function dsl
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
dsl: function() {
return {
/**
Function attrAsReferenceToMany
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attrAsReferenceToMany: function(_attr, _model, _keys) {
this.attrDefault(_attr, function() { return []; })
.attrMask(_attr, Utils.WRITE_MASK)
.attrMeta(_attr, { relation: 'belongs_to_many' });
Function attrAsReference
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attrAsReference: function(_attr, _model, _key, _prefetch) {
this.attrDefault(_attr, null)
.attrMask(_attr, Utils.WRITE_MASK)
.attrMeta(_attr, { relation: 'belongs_to' });
Function decode
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function decode(_from, _to, _prefix, _mask, _ctx) {
var key, decodedName, fullName, value, maps, isMapped, i, l,
prefix = _prefix ? _prefix + '.' : '';
// explicit mappings
Function describe
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
describe: function(_description) {
forEach(_description, function(_desc, _attr) {
switch(_attr.charAt(0)) {
case '@':
$log.warn('Usage of @ in description objects will be removed in 1.2, use a $extend block instead');
Function attrAsCollection
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attrAsCollection: function(_attr, _model, _url, _source, _inverseOf, _params, _hooks) {
var options, globalHooks; // global relation configuration
this.attrDefault(_attr, function() {
Function $send
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$send: function(_options, _success, _error) {
// make sure a style base was selected for the model
if(!this.$type.getProperty('style')) {
$log.warn('No API style base was selected, see the Api Integration FAQ for more information on this warning');
Function buildArrayType
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
buildArrayType: function(_forceIframe) {
var arrayType;
if(PROTO_SETTER && !_forceIframe) {
Function encode
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function encode(_from, _to, _prefix, _mask, _ctx) {
var key, fullName, encodedName, value, maps,
prefix = _prefix ? _prefix + '.' : '';
// implicit mappings
Function exports
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
// Base path, that will be used to resolve files and exclude
basePath: '',
Function define
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
define: function(_where, _fun) {
var name = false, api = 'Record';
if(typeof _fun === 'object' && _fun) {
api = _where;
Function attrAsResource
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
attrAsResource: function(_attr, _model, _url, _source, _inverseOf, _hooks) {
var options, globalHooks; // global relation configuration
this.attrDefault(_attr, function() {
Function attrAsCollection
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
attrAsCollection: function(_attr, _model, _url, _source, _inverseOf, _params, _hooks) {
Avoid deeply nested control flow statements. Open
Open
if(_desc.hasOwnProperty(key)) this.define(key, _desc[key]);
Avoid deeply nested control flow statements. Open
Open
for(var key in _desc) {
if(_desc.hasOwnProperty(key)) this.on(key, _desc[key]);
}
Avoid deeply nested control flow statements. Open
Open
} else if(VAR_RGX.test(_attr)) {
$log.warn('Usage of ~ in description objects will be removed in 1.2, use a $config block instead');
_attr = inflector.camelize(_attr.toLowerCase());
this.setProperty(_attr, _desc);
}