inversify/inversify-binding-decorators

View on GitHub

Showing 49 of 49 total issues

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

gulp.task("build-lib", function () {
    return gulp.src([
        "src/**/*.ts"
    ])
        .pipe(tsLibProject())
Severity: Major
Found in gulpfile.js and 4 other locations - About 2 hrs to fix
gulpfile.js on lines 53..62
gulpfile.js on lines 69..78
gulpfile.js on lines 102..111
gulpfile.js on lines 115..124

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

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

gulp.task("build-src", function () {
    return gulp.src([
        "src/**/*.ts"
    ])
        .pipe(tstProject())
Severity: Major
Found in gulpfile.js and 4 other locations - About 2 hrs to fix
gulpfile.js on lines 38..47
gulpfile.js on lines 53..62
gulpfile.js on lines 69..78
gulpfile.js on lines 115..124

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

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

    public constructor(
        bindingInSyntax: (bind: inversifyInterfaces.Bind, target: any) => inversifyInterfaces.BindingInSyntax<T>,
        provideDoneSyntax: interfaces.ProvideDoneSyntax
    ) {
        this._bindingInSyntax = bindingInSyntax;
Severity: Major
Found in src/syntax/provide_in_syntax.ts and 2 other locations - About 2 hrs to fix
src/syntax/provide_on_syntax.ts on lines 11..17
src/syntax/provide_when_syntax.ts on lines 11..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 79.

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

    public constructor(
        bindingOnSyntax: (bind: inversifyInterfaces.Bind, target: any) => inversifyInterfaces.BindingOnSyntax<T>,
        provideDoneSyntax: interfaces.ProvideDoneSyntax
    ) {
        this._bindingOnSyntax = bindingOnSyntax;
Severity: Major
Found in src/syntax/provide_on_syntax.ts and 2 other locations - About 2 hrs to fix
src/syntax/provide_in_syntax.ts on lines 13..19
src/syntax/provide_when_syntax.ts on lines 11..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 79.

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

    public constructor(
        bindingWhenSyntax: (bind: inversifyInterfaces.Bind, target: any) => inversifyInterfaces.BindingWhenSyntax<T>,
        provideDoneSyntax: interfaces.ProvideDoneSyntax
    ) {
        this._bindingWhenSyntax = bindingWhenSyntax;
Severity: Major
Found in src/syntax/provide_when_syntax.ts and 2 other locations - About 2 hrs to fix
src/syntax/provide_in_syntax.ts on lines 13..19
src/syntax/provide_on_syntax.ts on lines 11..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 79.

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

    public onActivation(fn: (context: inversifyInterfaces.Context, injectable: T) => T): interfaces.ProvideWhenSyntax<T> {
        return this._provideOnSyntax.onActivation(fn);
    }
Severity: Major
Found in src/syntax/provide_in_when_on_syntax.ts and 1 other location - About 1 hr to fix
src/syntax/provide_when_on_syntax.ts on lines 73..75

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

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

    public onActivation(fn: (context: inversifyInterfaces.Context, injectable: T) => T): interfaces.ProvideWhenSyntax<T> {
        return this._provideOnSyntax.onActivation(fn);
    }
Severity: Major
Found in src/syntax/provide_when_on_syntax.ts and 1 other location - About 1 hr to fix
src/syntax/provide_in_when_on_syntax.ts on lines 76..78

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

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

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

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

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

Refactorings

Further Reading

Function done has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public done(force?: boolean) {
        const that = this;
        return function (target: any) {

            const isAlreadyDecorated = Reflect.hasOwnMetadata(inversify_METADATA_KEY.PARAM_TYPES, target);
Severity: Minor
Found in src/syntax/provide_done_syntax.ts - About 1 hr to fix

    Function provide has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function provide(
      serviceIdentifier: inversifyInterfaces.ServiceIdentifier<any>,
      force?: boolean
    ) {
    
    Severity: Minor
    Found in src/decorator/provide.ts - About 1 hr to fix

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

          public whenNoAncestorMatches(constraint: (request: inversifyInterfaces.Request) => boolean): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenNoAncestorMatches(constraint);
          }
      Severity: Major
      Found in src/syntax/provide_when_on_syntax.ts and 5 other locations - About 1 hr to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 20..22
      src/syntax/provide_in_when_on_syntax.ts on lines 68..70
      src/syntax/provide_in_when_on_syntax.ts on lines 72..74
      src/syntax/provide_when_on_syntax.ts on lines 17..19
      src/syntax/provide_when_on_syntax.ts on lines 65..67

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

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

          public when(constraint: (request: inversifyInterfaces.Request) => boolean): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.when(constraint);
          }
      Severity: Major
      Found in src/syntax/provide_in_when_on_syntax.ts and 5 other locations - About 1 hr to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 68..70
      src/syntax/provide_in_when_on_syntax.ts on lines 72..74
      src/syntax/provide_when_on_syntax.ts on lines 17..19
      src/syntax/provide_when_on_syntax.ts on lines 65..67
      src/syntax/provide_when_on_syntax.ts on lines 69..71

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

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

          public whenNoAncestorMatches(constraint: (request: inversifyInterfaces.Request) => boolean): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenNoAncestorMatches(constraint);
          }
      Severity: Major
      Found in src/syntax/provide_in_when_on_syntax.ts and 5 other locations - About 1 hr to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 20..22
      src/syntax/provide_in_when_on_syntax.ts on lines 68..70
      src/syntax/provide_when_on_syntax.ts on lines 17..19
      src/syntax/provide_when_on_syntax.ts on lines 65..67
      src/syntax/provide_when_on_syntax.ts on lines 69..71

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

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

          public when(constraint: (request: inversifyInterfaces.Request) => boolean): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.when(constraint);
          }
      Severity: Major
      Found in src/syntax/provide_when_on_syntax.ts and 5 other locations - About 1 hr to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 20..22
      src/syntax/provide_in_when_on_syntax.ts on lines 68..70
      src/syntax/provide_in_when_on_syntax.ts on lines 72..74
      src/syntax/provide_when_on_syntax.ts on lines 65..67
      src/syntax/provide_when_on_syntax.ts on lines 69..71

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

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

          public whenAnyAncestorMatches(constraint: (request: inversifyInterfaces.Request) => boolean): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenAnyAncestorMatches(constraint);
          }
      Severity: Major
      Found in src/syntax/provide_in_when_on_syntax.ts and 5 other locations - About 1 hr to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 20..22
      src/syntax/provide_in_when_on_syntax.ts on lines 72..74
      src/syntax/provide_when_on_syntax.ts on lines 17..19
      src/syntax/provide_when_on_syntax.ts on lines 65..67
      src/syntax/provide_when_on_syntax.ts on lines 69..71

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

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

          public whenAnyAncestorMatches(constraint: (request: inversifyInterfaces.Request) => boolean): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenAnyAncestorMatches(constraint);
          }
      Severity: Major
      Found in src/syntax/provide_when_on_syntax.ts and 5 other locations - About 1 hr to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 20..22
      src/syntax/provide_in_when_on_syntax.ts on lines 68..70
      src/syntax/provide_in_when_on_syntax.ts on lines 72..74
      src/syntax/provide_when_on_syntax.ts on lines 17..19
      src/syntax/provide_when_on_syntax.ts on lines 69..71

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

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

          public whenNoAncestorIs(ancestor: (Function|string)): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenNoAncestorIs(ancestor);
          }
      Severity: Major
      Found in src/syntax/provide_when_on_syntax.ts and 5 other locations - About 50 mins to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 32..34
      src/syntax/provide_in_when_on_syntax.ts on lines 44..46
      src/syntax/provide_in_when_on_syntax.ts on lines 48..50
      src/syntax/provide_when_on_syntax.ts on lines 29..31
      src/syntax/provide_when_on_syntax.ts on lines 41..43

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 51.

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

          public whenAnyAncestorIs(ancestor: (Function|string)): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenAnyAncestorIs(ancestor);
          }
      Severity: Major
      Found in src/syntax/provide_when_on_syntax.ts and 5 other locations - About 50 mins to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 32..34
      src/syntax/provide_in_when_on_syntax.ts on lines 44..46
      src/syntax/provide_in_when_on_syntax.ts on lines 48..50
      src/syntax/provide_when_on_syntax.ts on lines 29..31
      src/syntax/provide_when_on_syntax.ts on lines 45..47

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

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

          public whenAnyAncestorIs(ancestor: (Function|string)): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenAnyAncestorIs(ancestor);
          }
      Severity: Major
      Found in src/syntax/provide_in_when_on_syntax.ts and 5 other locations - About 50 mins to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 32..34
      src/syntax/provide_in_when_on_syntax.ts on lines 48..50
      src/syntax/provide_when_on_syntax.ts on lines 29..31
      src/syntax/provide_when_on_syntax.ts on lines 41..43
      src/syntax/provide_when_on_syntax.ts on lines 45..47

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

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

          public whenInjectedInto(parent: (Function|string)): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenInjectedInto(parent);
          }
      Severity: Major
      Found in src/syntax/provide_when_on_syntax.ts and 5 other locations - About 50 mins to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 32..34
      src/syntax/provide_in_when_on_syntax.ts on lines 44..46
      src/syntax/provide_in_when_on_syntax.ts on lines 48..50
      src/syntax/provide_when_on_syntax.ts on lines 41..43
      src/syntax/provide_when_on_syntax.ts on lines 45..47

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

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

          public whenInjectedInto(parent: (Function|string)): interfaces.ProvideOnSyntax<T> {
              return this._provideWhenSyntax.whenInjectedInto(parent);
          }
      Severity: Major
      Found in src/syntax/provide_in_when_on_syntax.ts and 5 other locations - About 50 mins to fix
      src/syntax/provide_in_when_on_syntax.ts on lines 44..46
      src/syntax/provide_in_when_on_syntax.ts on lines 48..50
      src/syntax/provide_when_on_syntax.ts on lines 29..31
      src/syntax/provide_when_on_syntax.ts on lines 41..43
      src/syntax/provide_when_on_syntax.ts on lines 45..47

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

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

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

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

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

      Refactorings

      Further Reading

      Severity
      Category
      Status
      Source
      Language