XingFramework/Relayer

View on GitHub

Showing 591 of 591 total issues

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

export default class MultipleRelationshipDescription extends RelationshipDescription {
  constructor(relationshipInitializerFactory,
    resourceMapperFactory,
    resourceSerializerFactory,
    inflector,
src/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 3..43

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

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 MultipleRelationshipDescription extends RelationshipDescription {
  constructor(relationshipInitializerFactory,
    resourceMapperFactory,
    resourceSerializerFactory,
    inflector,
dist/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 3..43

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

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 jsonPath has 185 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function jsonPath(obj, expr, arg) {
    var P = {
      resultType: arg && arg.resultType || "value",
      flatten: arg && arg.flatten || false,
      wrap: (arg && arg.hasOwnProperty('wrap')) ? arg.wrap : true,
Severity: Major
Found in dist/relayer.es5.js - About 7 hrs to fix

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

    export default class MapResourceMapper extends Mapper {
    
      constructor(singleRelationshipDescriptionFactory,
        transport, response, relationshipDescription, useErrors = false) {
        super(transport, response, relationshipDescription, useErrors);
    Severity: Major
    Found in src/relayer/mappers/MapResourceMapper.js and 1 other location - About 7 hrs to fix
    dist/relayer/mappers/MapResourceMapper.js on lines 5..26

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

    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 MapResourceMapper extends Mapper {
    
      constructor(singleRelationshipDescriptionFactory,
        transport, response, relationshipDescription, useErrors = false) {
        super(transport, response, relationshipDescription, useErrors);
    Severity: Major
    Found in dist/relayer/mappers/MapResourceMapper.js and 1 other location - About 7 hrs to fix
    src/relayer/mappers/MapResourceMapper.js on lines 5..26

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

    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

            try {
              for (var $__4 = void 0,
                  $__3 = (path)[$traceurRuntime.toProperty(Symbol.iterator)](); !($__6 = ($__4 = $__3.next()).done); $__6 = true) {
                var segment = $__4.value;
                {
    Severity: Major
    Found in dist/relayer.es5.js and 1 other location - About 7 hrs to fix
    dist/relayer.es5.js on lines 317..338

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

    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

          try {
            for (var $__4 = void 0,
                $__3 = (path)[$traceurRuntime.toProperty(Symbol.iterator)](); !($__6 = ($__4 = $__3.next()).done); $__6 = true) {
              var segment = $__4.value;
              {
    Severity: Major
    Found in dist/relayer.es5.js and 1 other location - About 7 hrs to fix
    dist/relayer.es5.js on lines 271..292

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

    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 jsonPath has 175 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function jsonPath(obj, expr, arg) {
      var P = {
        resultType: arg && arg.resultType || "value",
        flatten: arg && arg.flatten || false,
        wrap: arg && arg.hasOwnProperty("wrap") ? arg.wrap : true,
    Severity: Major
    Found in dist/cjs/relayer/jsonpath.js - About 7 hrs to fix

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

      export default class MapRelationshipInitializer extends RelationshipInitializer {
      
        constructor(singleRelationshipInitializerFactory,
          ResourceClass,
          initialValues) {
      Severity: Major
      Found in src/relayer/initializers/MapRelationshipInitializer.js and 1 other location - About 7 hrs to fix
      dist/relayer/initializers/MapRelationshipInitializer.js on lines 5..27

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

      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 MapRelationshipInitializer extends RelationshipInitializer {
      
        constructor(singleRelationshipInitializerFactory,
          ResourceClass,
          initialValues) {
      Severity: Major
      Found in dist/relayer/initializers/MapRelationshipInitializer.js and 1 other location - About 7 hrs to fix
      src/relayer/initializers/MapRelationshipInitializer.js on lines 5..27

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

      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 ManyResourceMapper extends Mapper {
      
        constructor(singleRelationshipDescriptionFactory, transport, response, relationshipDescription, useErrors = false) {
          super(transport, response, relationshipDescription, useErrors);
          this.singleRelationshipDescription = singleRelationshipDescriptionFactory("", this.ResourceClass);
      Severity: Major
      Found in src/relayer/mappers/ManyResourceMapper.js and 1 other location - About 6 hrs to fix
      dist/relayer/mappers/ManyResourceMapper.js on lines 5..24

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

      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 ManyResourceMapper extends Mapper {
      
        constructor(singleRelationshipDescriptionFactory, transport, response, relationshipDescription, useErrors = false) {
          super(transport, response, relationshipDescription, useErrors);
          this.singleRelationshipDescription = singleRelationshipDescriptionFactory("", this.ResourceClass);
      Severity: Major
      Found in dist/relayer/mappers/ManyResourceMapper.js and 1 other location - About 6 hrs to fix
      src/relayer/mappers/ManyResourceMapper.js on lines 5..24

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      Severity: Major
      Found in dist/cjs/relayer/decorators/JsonPropertyDecorator.js and 47 other locations - About 6 hrs to fix
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/DataWrapper.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemplatedUrl.js on lines 9..9
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      Severity: Major
      Found in dist/cjs/relayer/serializers/MapResourceSerializer.js and 47 other locations - About 6 hrs to fix
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/DataWrapper.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemplatedUrl.js on lines 9..9
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/DataWrapper.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemplatedUrl.js on lines 9..9
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      Severity: Major
      Found in dist/cjs/relayer/transformers/ThrowErrorTransformer.js and 47 other locations - About 6 hrs to fix
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/DataWrapper.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemplatedUrl.js on lines 9..9
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      Severity: Major
      Found in dist/cjs/relayer/transformers/SingleFromManyTransformer.js and 47 other locations - About 6 hrs to fix
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/DataWrapper.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemplatedUrl.js on lines 9..9
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      Severity: Major
      Found in dist/cjs/relayer/TemplatedUrl.js and 47 other locations - About 6 hrs to fix
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/DataWrapper.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      Severity: Major
      Found in dist/cjs/relayer/DataWrapper.js and 47 other locations - About 6 hrs to fix
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemplatedUrl.js on lines 9..9
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/RelatedResourceDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

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

      var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();
      Severity: Major
      Found in dist/cjs/relayer/decorators/RelatedResourceDecorator.js and 47 other locations - About 6 hrs to fix
      dist/cjs/relayer.js on lines 7..7
      dist/cjs/relayer/APIError.js on lines 7..7
      dist/cjs/relayer/DataWrapper.js on lines 7..7
      dist/cjs/relayer/MetaMap.js on lines 7..7
      dist/cjs/relayer/PrimaryResourceBuilder.js on lines 7..7
      dist/cjs/relayer/RelationshipUtilities.js on lines 7..7
      dist/cjs/relayer/Resource.js on lines 7..7
      dist/cjs/relayer/ResourceBuilder.js on lines 7..7
      dist/cjs/relayer/ResourceDescription.js on lines 7..7
      dist/cjs/relayer/TemplatedUrl.js on lines 9..9
      dist/cjs/relayer/TemporaryTemplatedUrl.js on lines 7..7
      dist/cjs/relayer/Transport.js on lines 7..7
      dist/cjs/relayer/UrlHelper.js on lines 7..7
      dist/cjs/relayer/decorators/JsonPropertyDecorator.js on lines 7..7
      dist/cjs/relayer/decorators/ResourceDecorator.js on lines 7..7
      dist/cjs/relayer/endpoints/Endpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/LoadedDataEndpoint.js on lines 7..7
      dist/cjs/relayer/endpoints/ResolvedEndpoint.js on lines 7..7
      dist/cjs/relayer/initializers/ListRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/ManyRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/MapRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/RelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/initializers/SingleRelationshipInitializer.js on lines 7..7
      dist/cjs/relayer/injector.js on lines 10..10
      dist/cjs/relayer/mappers/ListResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/ManyResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/MapResourceMapper.js on lines 7..7
      dist/cjs/relayer/mappers/Mapper.js on lines 7..7
      dist/cjs/relayer/mappers/ResourceMapper.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/ListRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/MultipleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/RelationshipDescription.js on lines 7..7
      dist/cjs/relayer/relationshipDescriptions/SingleRelationshipDescription.js on lines 7..7
      dist/cjs/relayer/serializers/ListResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ManyResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/MapResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/ResourceSerializer.js on lines 7..7
      dist/cjs/relayer/serializers/Serializer.js on lines 7..7
      dist/cjs/relayer/transformers/CreateResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedPropertyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/EmbeddedRelationshipTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/IndividualFromListTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/PrimaryResourceTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ResourceTransformer.js on lines 14..14
      dist/cjs/relayer/transformers/SingleFromManyTransformer.js on lines 7..7
      dist/cjs/relayer/transformers/ThrowErrorTransformer.js on lines 7..7
      dist/cjs/src/relayer.js on lines 7..7

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

      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