XingFramework/Relayer

View on GitHub

Showing 591 of 591 total issues

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

var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/mappers/MapResourceMapper.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/mappers/ResourceMapper.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/endpoints/PromiseEndpoint.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/decorators/RelatedResourceDecorator.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/transformers/SingleFromManyTransformer.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/endpoints/ResolvedEndpoint.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/Resource.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/APIError.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/mappers/ManyResourceMapper.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/serializers/MapResourceSerializer.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ('value' in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/injector.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x3, _x4, _x5) { var _again = true; _function: while (_again) { var object = _x3, property = _x4, receiver = _x5; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x3 = parent; _x4 = property; _x5 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/mappers/ListResourceMapper.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/serializers/ListResourceSerializer.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 9..9
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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 29 locations. Consider refactoring.
Open

var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } };
Severity: Major
Found in dist/cjs/relayer/TemporaryTemplatedUrl.js and 28 other locations - About 1 day to fix
dist/cjs/relayer/APIError.js on lines 9..9
dist/cjs/relayer/Resource.js on lines 9..9
dist/cjs/relayer/TemplatedUrl.js on lines 7..7
dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 9..9
dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 9..9
dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 9..9
dist/cjs/relayer/endpoints/PromiseEndpoint.js on lines 7..7
dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 9..9
dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 9..9
dist/cjs/relayer/injector.js on lines 8..8
dist/cjs/relayer/mappers/ListResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/MapResourceMapper.js on lines 9..9
dist/cjs/relayer/mappers/ResourceMapper.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 9..9
dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 9..9
dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 9..9
dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 9..9
dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 9..9
dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 9..9
dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 9..9
dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 9..9

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 224.

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