Hirse/brackets-outline-list

View on GitHub

Showing 905 of 905 total issues

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

        } else if (type === tt.num) {
            token.type = Token.Numeric;
            token.value = this._code.slice(token.start, token.end);
        } else if (type === tt.string) {

Severity: Minor
Found in thirdparty/espree.js and 1 other location - About 50 mins to fix
thirdparty/espree.js on lines 7308..7357

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

        case this.tok.T_POW_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '**=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

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

    if (this.next().token == this.tok.T_EXTENDS) {
      propExtends = this.next().read_namespace_name();
    }
Severity: Minor
Found in thirdparty/php-parser.js and 1 other location - About 50 mins to fix
thirdparty/php-parser.js on lines 5078..5080

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

        case this.tok.T_OR_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '|=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

        case this.tok.T_SR_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign',expr, this.next().read_expr(), '>>=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987

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

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

    if (this.next().token == this.tok.T_EXTENDS) {
      propExtends = this.next().read_namespace_name();
    }
Severity: Minor
Found in thirdparty/php-parser.js and 1 other location - About 50 mins to fix
thirdparty/php-parser.js on lines 5398..5400

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

        case this.tok.T_DIV_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '/=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

        case this.tok.T_AND_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '&=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

        case this.tok.T_MOD_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '%=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

  if (!noAssert) {
    var limit = Math.pow(2, (8 * byteLength) - 1)

    checkInt(this, value, offset, byteLength, limit - 1, -limit)
  }
Severity: Minor
Found in thirdparty/postcss-safe-parser.js and 1 other location - About 50 mins to fix
thirdparty/postcss-safe-parser.js on lines 1579..1583

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

  if (!noAssert) {
    var limit = Math.pow(2, (8 * byteLength) - 1)

    checkInt(this, value, offset, byteLength, limit - 1, -limit)
  }
Severity: Minor
Found in thirdparty/postcss-safe-parser.js and 1 other location - About 50 mins to fix
thirdparty/postcss-safe-parser.js on lines 1556..1560

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

        case this.tok.T_MINUS_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '-=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

        case this.tok.T_MUL_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '*=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

        case this.tok.T_SL_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '<<=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5989..5991

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

        case this.tok.T_CONCAT_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '.=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5981..5983
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

        case this.tok.T_XOR_EQUAL:
          if (isConst) this.error('VARIABLE');
          return result('assign', expr, this.next().read_expr(), '^=');
Severity: Major
Found in thirdparty/php-parser.js and 10 other locations - About 50 mins to fix
thirdparty/php-parser.js on lines 5949..5951
thirdparty/php-parser.js on lines 5953..5955
thirdparty/php-parser.js on lines 5957..5959
thirdparty/php-parser.js on lines 5961..5963
thirdparty/php-parser.js on lines 5965..5967
thirdparty/php-parser.js on lines 5969..5971
thirdparty/php-parser.js on lines 5973..5975
thirdparty/php-parser.js on lines 5977..5979
thirdparty/php-parser.js on lines 5985..5987
thirdparty/php-parser.js on lines 5989..5991

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

Function Class has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

var Class = Declaration.extends(function Class(name, ext, impl, body, flags, location) {
Severity: Minor
Found in thirdparty/php-parser.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

        if (result.right && result.right.kind === 'bin') {
          var lLevel = AST.precedence['='];
          var rLevel = AST.precedence[result.right.type];
          // only shifts with and, xor, or
          if (lLevel && rLevel && rLevel < lLevel) {
    Severity: Major
    Found in thirdparty/php-parser.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  if (tChar === '\'') {
                    this.begin('ST_NOWDOC');
                  } else {
                    this.begin('ST_HEREDOC');
                  }
      Severity: Major
      Found in thirdparty/php-parser.js - About 45 mins to fix

        Function For has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        var For = Statement.extends(function For(init, test, increment, body, shortForm, location) {
        Severity: Minor
        Found in thirdparty/php-parser.js - About 45 mins to fix
          Severity
          Category
          Status
          Source
          Language