aurelia/aurelia

View on GitHub
packages/__tests__/src/1-kernel/di.get.spec.ts

Summary

Maintainability
F
2 wks
Test Coverage

File di.get.spec.ts has 867 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { all, Constructable, DI, factory, IContainer, resolve, IResolvedFactory, lazy, newInstanceForScope, newInstanceOf, optional, Registration, singleton, transient } from '@aurelia/kernel';
import { assert } from '@aurelia/testing';

describe('1-kernel/di.get.spec.ts', function () {
  let container: IContainer;
Severity: Major
Found in packages/__tests__/src/1-kernel/di.get.spec.ts - About 2 days to fix

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

            it('children', function () {
              const root = DI.createContainer();
              const child1 = root.createChild();
              const child2 = root.createChild();
    
    
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 3 other locations - About 7 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 61..75
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 85..99
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 107..121

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

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

            it('root', function () {
              const root = DI.createContainer();
              const child1 = root.createChild();
              const child2 = root.createChild();
    
    
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 3 other locations - About 7 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 45..59
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 85..99
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 107..121

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

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

            it('children', function () {
              const root = DI.createContainer();
              const child1 = root.createChild();
              const child2 = root.createChild();
    
    
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 3 other locations - About 7 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 45..59
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 61..75
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 85..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 192.

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

            it('children', function () {
              const root = DI.createContainer();
              const child1 = root.createChild();
              const child2 = root.createChild();
    
    
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 3 other locations - About 7 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 45..59
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 61..75
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 107..121

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

    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

        it('works with resolve(newInstanceOf(...))', function () {
          let id = 0;
          class Model { id = ++id; }
          const { a, b } = container.get(class A {
            _ = resolve(Model);
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 1 other location - About 5 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 885..896

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

    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

        it('works with resolve(newInstanceForScope(...))', function () {
          let id = 0;
          class Model { id = ++id; }
          const { a, b } = container.get(class A {
            _ = resolve(Model);
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 1 other location - About 5 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 872..883

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

    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

          it('works with a list of keys', function () {
            let i = 0;
            class Model { v = ++i; }
            class Base {
              a = resolve(Model, newInstanceOf(Model));
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 1 other location - About 4 hrs to fix
    packages/__tests__/src/1-kernel/di.invoke.spec.ts on lines 133..142

    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

        it('works with a list of keys', function () {
          let i = 0;
          class Model { v = ++i; }
          class Base {
            a = resolve(Model, newInstanceOf(Model));
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 1 other location - About 3 hrs to fix
    packages/__tests__/src/1-kernel/di.invoke.spec.ts on lines 117..126

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 113.

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

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

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

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

    Refactorings

    Further Reading

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

          container.registerFactory(I as unknown as Constructable, {
            Type: IImpl,
            construct(c: IContainer) {
              return c.getFactory(this.Type).construct(c);
            },
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 590..598
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 705..713

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

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

          container.registerFactory(I as unknown as Constructable, {
            Type: IImpl,
            construct(c: IContainer) {
              return c.getFactory(this.Type).construct(c);
            },
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 590..598
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 622..630

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

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

          container.registerFactory(I as unknown as Constructable, {
            Type: IImpl,
            construct(c: IContainer) {
              return c.getFactory(this.Type).construct(c);
            },
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 2 other locations - About 2 hrs to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 622..630
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 705..713

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

    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

          it('Set', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Set<unknown>) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 358..365

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

    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

          it('Promise', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Promise<unknown>) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 394..401

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

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

          it('Int16Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Int16Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

            it('SharedArrayBuffer', function () {
              @singleton
              class Foo {
                public constructor(private readonly test: SharedArrayBuffer) {
                }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('EvalError', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: EvalError) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('String', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: String) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Uint16Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Uint16Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Int32Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Int16Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Number', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Number) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Uint8Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Uint8Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Uint32Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Uint32Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Function', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Function) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('RegExp', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: RegExp) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('UriError', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: URIError) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483

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

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

          it('DataView', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: DataView) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Object', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Object) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Date', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Date) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('TypeError', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: TypeError) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Boolean', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Boolean) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('ArrayBuffer', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: ArrayBuffer) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('SyntaxError', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: SyntaxError) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Float32Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Float32Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('RangeError', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: RangeError) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Uint8ClampedArray', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Uint8ClampedArray) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Float64Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Float64Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Int8Array', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Int8Array) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('ReferenceError', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: ReferenceError) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 241..248
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

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

          it('Error', function () {
            @singleton
            class Foo {
              public constructor(private readonly test: Error) {
              }
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 25 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 197..204
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 206..213
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 224..231
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 233..240
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 250..257
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 259..266
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 268..275
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 277..284
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 286..293
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 295..302
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 304..311
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 322..329
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 340..347
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 367..374
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 376..383
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 385..392
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 404..411
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 414..421
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 432..439
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 441..448
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 450..457
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 459..466
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 468..475
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 476..483
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 484..491

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

    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

          container.register(
            Registration.transient(II, class I1 {
              a = resolve(Model);
            }),
            Registration.transient(II, class I2 {
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 1 other location - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.getAll.spec.ts on lines 110..117

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

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

          const { a, b } = container.get(class A {
            a = resolve(lazy(Model));
            b = resolve(lazy(Model));
          });
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 864..867
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 910..913

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

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

          const { a, b } = container.get(class A {
            a = resolve(optional(Model));
            b = resolve(optional(Model));
          });
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 852..855
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 910..913

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

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

          const { a, b } = container.get(class A {
            a = resolve(factory(Model));
            b = resolve(factory(Model));
          });
    Severity: Major
    Found in packages/__tests__/src/1-kernel/di.get.spec.ts and 2 other locations - About 1 hr to fix
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 852..855
    packages/__tests__/src/1-kernel/di.get.spec.ts on lines 864..867

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

    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

    There are no issues that match your filters.

    Category
    Status