XingFramework/Relayer

View on GitHub

Showing 591 of 591 total issues

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

class ConstructableInjectable extends Injectable {
  constructor(Target) {
    super();
    this.Target = Target;
  }
Severity: Major
Found in dist/relayer/injector.js and 1 other location - About 5 hrs to fix
src/relayer/injector.js on lines 83..99

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

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

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

class ConstructableInjectable extends Injectable {
  constructor(Target) {
    super();
    this.Target = Target;
  }
Severity: Major
Found in src/relayer/injector.js and 1 other location - About 5 hrs to fix
dist/relayer/injector.js on lines 83..99

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

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

Function RelatedResourceDecorator has 124 lines of code (exceeds 25 allowed). Consider refactoring.
Open

var RelatedResourceDecorator = (function (_ResourceDecorator) {
  function RelatedResourceDecorator(promiseEndpointFactory, relationshipUtilities, name, relationship) {
    _classCallCheck(this, RelatedResourceDecorator);

    _get(Object.getPrototypeOf(RelatedResourceDecorator.prototype), "constructor", this).call(this, name);
Severity: Major
Found in dist/cjs/relayer/decorators/RelatedResourceDecorator.js - About 4 hrs to fix

    Function Resource has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
    Open

    var Resource = (function (_DataWrapper) {
      function Resource(responseData) {
        _classCallCheck(this, Resource);
    
        _get(Object.getPrototypeOf(Resource.prototype), "constructor", this).call(this, responseData);
    Severity: Minor
    Found in dist/cjs/relayer/Resource.js - About 4 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function ListRelationshipDescription has 120 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    var ListRelationshipDescription = (function (_RelationshipDescription) {
      function ListRelationshipDescription(relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, singleRelationshipDescriptionFactory, ListResource, primaryResourceTransformerFactory, embeddedRelationshipTransformerFactory, individualFromListTransformerFactory, createResourceTransformerFactory, resolvedEndpointFactory, loadedDataEndpointFactory, templatedUrlFromUrlFactory, templatedUrlFactory, name, ResourceClass, initialValues) {
        _classCallCheck(this, ListRelationshipDescription);
    
        _get(Object.getPrototypeOf(ListRelationshipDescription.prototype), "constructor", this).call(this, relationshipInitializerFactory, resourceMapperFactory, resourceSerializerFactory, inflector, name, ResourceClass, initialValues);

      Function DataWrapper has 116 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var DataWrapper = (function () {
        function DataWrapper(response) {
          _classCallCheck(this, DataWrapper);
      
          this._response = response;
      Severity: Major
      Found in dist/cjs/relayer/DataWrapper.js - About 4 hrs to fix

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

            value: function initialize() {
              var _this = this;
        
              var relationship = [];
              var response = [];
        Severity: Major
        Found in dist/cjs/relayer/initializers/ManyRelationshipInitializer.js and 1 other location - About 4 hrs to fix
        dist/relayer.es5.js on lines 3550..3563

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

        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

          ($traceurRuntime.createClass)(ManyRelationshipInitializer, {initialize: function() {
              var $__6 = this;
              var relationship = [];
              var response = [];
              if (this.initialValues) {
        Severity: Major
        Found in dist/relayer.es5.js and 1 other location - About 4 hrs to fix
        dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 39..53

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

        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

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

        export default class PrimaryResourceBuilder {
          constructor(response, ResourceClass) {
            this.response = response;
            this.ResourceClass = ResourceClass;
          }
        Severity: Major
        Found in dist/relayer/PrimaryResourceBuilder.js and 1 other location - About 4 hrs to fix
        src/relayer/PrimaryResourceBuilder.js on lines 1..17

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

        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

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

        export default class PrimaryResourceBuilder {
          constructor(response, ResourceClass) {
            this.response = response;
            this.ResourceClass = ResourceClass;
          }
        Severity: Major
        Found in src/relayer/PrimaryResourceBuilder.js and 1 other location - About 4 hrs to fix
        dist/relayer/PrimaryResourceBuilder.js on lines 1..17

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

        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

        Function resourceFn has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

          get resourceFn(){
            if(!this._resourceFn) {
              var name = this.name;
              var relationship = this.relationship;
              var promiseEndpointFactory = this.promiseEndpointFactory;
        Severity: Minor
        Found in dist/relayer/decorators/RelatedResourceDecorator.js - About 4 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Function resourceFn has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
        Open

          get resourceFn(){
            if(!this._resourceFn) {
              var name = this.name;
              var relationship = this.relationship;
              var promiseEndpointFactory = this.promiseEndpointFactory;
        Severity: Minor
        Found in src/relayer/decorators/RelatedResourceDecorator.js - About 4 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

        (0, _injectorJs.Inject)((0, _injectorJs.factory)(_initializersMapRelationshipInitializerJs2["default"]), (0, _injectorJs.factory)(_mappersMapResourceMapperJs2["default"]), (0, _injectorJs.factory)(_serializersMapResourceSerializerJs2["default"]), _xingInflector2["default"], (0, _injectorJs.factory)(_transformersEmbeddedRelationshipTransformerJs2["default"]), (0, _injectorJs.factory)(_transformersSingleFromManyTransformerJs2["default"]), (0, _injectorJs.factory)(_endpointsLoadedDataEndpointJs2["default"]))(MapRelationshipDescription);
        dist/cjs/relayer/relationshipDescriptions/ManyRelationshipDescription.js on lines 63..63

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

        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

        (0, _injectorJs.Inject)((0, _injectorJs.factory)(_initializersManyRelationshipInitializerJs2["default"]), (0, _injectorJs.factory)(_mappersManyResourceMapperJs2["default"]), (0, _injectorJs.factory)(_serializersManyResourceSerializerJs2["default"]), _xingInflector2["default"], (0, _injectorJs.factory)(_transformersEmbeddedRelationshipTransformerJs2["default"]), (0, _injectorJs.factory)(_transformersSingleFromManyTransformerJs2["default"]), (0, _injectorJs.factory)(_endpointsLoadedDataEndpointJs2["default"]))(ManyRelationshipDescription);
        dist/cjs/relayer/relationshipDescriptions/MapRelationshipDescription.js on lines 63..63

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

        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

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

        export default class MapResourceSerializer extends Serializer {
        
          constructor(resourceSerializerFactory, resource) {
            super(resource);
            this.resourceSerializerFactory = resourceSerializerFactory;
        Severity: Major
        Found in src/relayer/serializers/MapResourceSerializer.js and 1 other location - About 4 hrs to fix
        dist/relayer/serializers/MapResourceSerializer.js on lines 5..18

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

        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

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

        export default class MapResourceSerializer extends Serializer {
        
          constructor(resourceSerializerFactory, resource) {
            super(resource);
            this.resourceSerializerFactory = resourceSerializerFactory;
        Severity: Major
        Found in dist/relayer/serializers/MapResourceSerializer.js and 1 other location - About 4 hrs to fix
        src/relayer/serializers/MapResourceSerializer.js on lines 5..18

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

        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

        Function ResourceDescription has 99 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        var ResourceDescription = (function () {
          function ResourceDescription(jsonPropertyDecoratorFactory, relatedResourceDecoratorFactory, singleRelationshipDescriptionFactory, manyRelationshipDescriptionFactory, listRelationshipDescriptionFactory, mapRelationshipDescriptionFactory, inflector) {
            _classCallCheck(this, ResourceDescription);
        
            this.jsonPropertyDecoratorFactory = jsonPropertyDecoratorFactory;
        Severity: Major
        Found in dist/cjs/relayer/ResourceDescription.js - About 3 hrs to fix

          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/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/APIError.js and 34 other locations - About 3 hrs to fix
          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
          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/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

          Severity
          Category
          Status
          Source
          Language