Showing 201 of 591 total issues
Function addMethods
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
addMethods(target, resource, name) {
target.get = function() {
return resource.relationships[name];
};
target.present = function() {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function addMethods
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
addMethods(target, resource, name) {
target.get = function() {
return resource.relationships[name];
};
target.present = function() {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MultipleRelationshipDescription
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
var MultipleRelationshipDescription = function MultipleRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, embeddedRelationshipTransformerFactory, singleFromManyTransformerFactory, loadedDataEndpointFactory, name, ResourceClass, initialValues) {
Function ListResourceMapper
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
var ListResourceMapper = function ListResourceMapper(templatedUrlFromUrlFactory, resourceBuilderFactory, primaryResourceBuilderFactory, primaryResourceTransformerFactory, manyResourceMapperFactory, temporaryTemplatedUrlFactory, transport, response, relationshipDescription, endpoint) {
Function RelationshipUtilities
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
var RelationshipUtilities = (function () {
function RelationshipUtilities() {
_classCallCheck(this, RelationshipUtilities);
}
Function _resourceFn
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
this._resourceFn = function(uriParams, recursiveCall = false) {
if (relationship.async && this.isPersisted) {
var endpoint;
if (!this.relationships[name]) {
if (recursiveCall === false) {
Function _resourceFn
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
this._resourceFn = function(uriParams, recursiveCall = false) {
if (relationship.async && this.isPersisted) {
var endpoint;
if (!this.relationships[name]) {
if (recursiveCall === false) {
Function LoadedDataEndpoint
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
var LoadedDataEndpoint = (function (_ResolvedEndpoint) {
function LoadedDataEndpoint(Promise, resolvedEndpoint, resource) {
var resourceTransformers = arguments[3] === undefined ? [] : arguments[3];
var createResourceTransformers = arguments[4] === undefined ? [] : arguments[4];
Function ResourceBuilder
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
function ResourceBuilder(templatedUrlFromUrlFactory, resolvedEndpointFactory, throwErrorTransformerFactory, createResourceTransformerFactory, transport, response, primaryResourceTransformer, ResourceClass, relationshipDescription) {
Function ResourceBuilder
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
var ResourceBuilder = function ResourceBuilder(templatedUrlFromUrlFactory, resolvedEndpointFactory, throwErrorTransformerFactory, createResourceTransformerFactory, transport, response, primaryResourceTransformer, ResourceClass, relationshipDescription) {
Function linkedEndpoint
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
linkedEndpoint: function(parent, uriParams) {
var transport = parent.self().transport;
var url,
templatedUrl,
primaryResourceTransformer,
Function errorFn
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
get errorFn() {
if(!this._errorFn) {
var name = this.name;
var path = this.path;
var relationship = this.relationship;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ResourceDescription
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var ResourceDescription = (function () {
function ResourceDescription(jsonPropertyDecoratorFactory, relatedResourceDecoratorFactory, singleRelationshipDescriptionFactory, manyRelationshipDescriptionFactory, listRelationshipDescriptionFactory, mapRelationshipDescriptionFactory, inflector) {
_classCallCheck(this, ResourceDescription);
this.jsonPropertyDecoratorFactory = jsonPropertyDecoratorFactory;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ResolvedEndpoint
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
var ResolvedEndpoint = (function (_Endpoint) {
function ResolvedEndpoint(Promise, transport, templatedUrl) {
var _this = this;
var resourceTransformers = arguments[3] === undefined ? [] : arguments[3];
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function errorFn
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
get errorFn() {
if(!this._errorFn) {
var name = this.name;
var path = this.path;
var relationship = this.relationship;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MultipleRelationshipDescription
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var MultipleRelationshipDescription = (function (_RelationshipDescription) {
function MultipleRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, embeddedRelationshipTransformerFactory, singleFromManyTransformerFactory, loadedDataEndpointFactory, name, ResourceClass, initialValues) {
_classCallCheck(this, MultipleRelationshipDescription);
_get(Object.getPrototypeOf(MultipleRelationshipDescription.prototype), "constructor", this).call(this, relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, name, ResourceClass, initialValues);
Function SingleFromManyTransformer
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var SingleFromManyTransformer = (function (_ResourceTransformer) {
function SingleFromManyTransformer(relationshipName, property) {
_classCallCheck(this, SingleFromManyTransformer);
_get(Object.getPrototypeOf(SingleFromManyTransformer.prototype), "constructor", this).call(this);
Function APIError
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
var APIError = (function (_DataWrapper) {
function APIError(responseData) {
var _this = this;
_classCallCheck(this, APIError);
Function EmbeddedRelationshipTransformer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
var EmbeddedRelationshipTransformer = (function (_ResourceTransformer) {
function EmbeddedRelationshipTransformer(relationshipName) {
_classCallCheck(this, EmbeddedRelationshipTransformer);
_get(Object.getPrototypeOf(EmbeddedRelationshipTransformer.prototype), "constructor", this).call(this);
Function get
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
get: function () {
if (!this._endpointFn) {
var name = this.name;