XingFramework/Relayer

View on GitHub

Showing 390 of 591 total issues

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/TemplatedUrl.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/serializers/ManyResourceSerializer.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/mappers/MapResourceMapper.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/injector.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/transformers/ThrowErrorTransformer.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/transformers/CreateResourceTransformer.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/mappers/ManyResourceMapper.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/serializers/ResourceSerializer.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/serializers/ListResourceSerializer.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    value: function _update(resource) {
      var _this = this;

      var request = this._transformRequest(this.resourceTransformers, resource);
      var response = this.transport.put(this.templatedUrl.url, request);
Severity: Major
Found in dist/cjs/relayer/endpoints/LoadedDataEndpoint.js and 1 other location - About 3 hrs to fix
dist/relayer.es5.js on lines 782..791

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/mappers/ResourceMapper.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 35 locations. Consider refactoring.
Open

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) subClass.__proto__ = superClass; }
Severity: Major
Found in dist/cjs/relayer/serializers/MapResourceSerializer.js and 34 other locations - About 3 hrs to fix
dist/cjs/relayer/APIError.js on lines 15..15
dist/cjs/relayer/ListResource.js on lines 11..11
dist/cjs/relayer/Resource.js on lines 15..15
dist/cjs/relayer/TemplatedUrl.js on lines 11..11
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 13..13
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 15..15
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 15..15
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 15..15
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 13..13
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 15..15
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 15..15
dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 13..13
dist/cjs/relayer/injector.js on lines 22..22
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 15..15
dist/cjs/relayer/mappers/ResourceMapper.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 11..11
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 15..15
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 15..15
dist/cjs/relayer/serializers/ResourceSerializer.js on lines 13..13
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 15..15
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 15..15
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 15..15
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 15..15
dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 13..13

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    _update: function(resource) {
      var $__4 = this;
      var request = this._transformRequest(this.resourceTransformers, resource);
      var response = this.transport.put(this.templatedUrl.url, request);
      response = response.then((function(data) {
Severity: Major
Found in dist/relayer.es5.js and 1 other location - About 3 hrs to fix
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 48..57

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 114.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      ["url", "uriTemplate", "uriParams"].forEach(function (func) {
        _this.mapped[func] = function () {
          var _resource;

          for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
Severity: Major
Found in dist/cjs/relayer/mappers/ListResourceMapper.js and 1 other location - About 3 hrs to fix
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 105..115

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      Object.keys(this.resource.relationships).forEach(function (key) {
        _this.mapped[key] = function () {
          var _resource2;

          for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
Severity: Major
Found in dist/cjs/relayer/mappers/ListResourceMapper.js and 1 other location - About 3 hrs to fix
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 82..92

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 113.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      Object.keys(this.resource.relationships).forEach((function(key) {
        $__16.mapped[key] = function() {
          var $__20;
          for (var args = [],
              $__19 = 0; $__19 < arguments.length; $__19++)
Severity: Major
Found in dist/relayer.es5.js and 1 other location - About 3 hrs to fix
dist/relayer.es5.js on lines 4039..4047

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 110.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

      ["url", "uriTemplate", "uriParams"].forEach((function(func) {
        $__16.mapped[func] = function() {
          var $__20;
          for (var args = [],
              $__19 = 0; $__19 < arguments.length; $__19++)
Severity: Major
Found in dist/relayer.es5.js and 1 other location - About 3 hrs to fix
dist/relayer.es5.js on lines 4058..4066

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 110.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language