pagseguro/magento2

View on GitHub

Showing 124 of 385 total issues

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

              if (
                result.reference !== undefined &&
                result.reference !== false
              ) {
                listTransactionLine1.append(
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 586..592
view/adminhtml/web/js/public.js on lines 594..598
view/adminhtml/web/js/public.js on lines 600..606
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 630..639
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 694..703
view/adminhtml/web/js/public.js on lines 749..758
view/adminhtml/web/js/public.js on lines 760..769

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

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

              if (
                result.installmentCount !== undefined &&
                result.installmentCount !== false
              ) {
                listPaymentLine1.append(
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 586..592
view/adminhtml/web/js/public.js on lines 594..598
view/adminhtml/web/js/public.js on lines 600..606
view/adminhtml/web/js/public.js on lines 608..617
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 630..639
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 749..758
view/adminhtml/web/js/public.js on lines 760..769

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

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

              if (
                result.cancelationSource !== undefined &&
                result.cancelationSource !== false
              ) {
                listTransactionLine2.append(
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 586..592
view/adminhtml/web/js/public.js on lines 594..598
view/adminhtml/web/js/public.js on lines 600..606
view/adminhtml/web/js/public.js on lines 608..617
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 694..703
view/adminhtml/web/js/public.js on lines 749..758
view/adminhtml/web/js/public.js on lines 760..769

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

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

              if (result.type !== undefined && result.type !== false) {
                listTransactionLine1.append(
                  '<dl class=""><dt>Tipo: </dt><dd>' +
                    result.type +
                    '</dd></dl>'
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 594..598
view/adminhtml/web/js/public.js on lines 600..606
view/adminhtml/web/js/public.js on lines 608..617
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 630..639
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 694..703
view/adminhtml/web/js/public.js on lines 749..758
view/adminhtml/web/js/public.js on lines 760..769

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

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

              if (result.code !== undefined && result.code !== false) {
                listTransactionLine1.append(
                  '<dl><dt>Código da transação: </dt><dd>' +
                    result.code +
                    '</dd></dl>'
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 586..592
view/adminhtml/web/js/public.js on lines 594..598
view/adminhtml/web/js/public.js on lines 608..617
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 630..639
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 694..703
view/adminhtml/web/js/public.js on lines 749..758
view/adminhtml/web/js/public.js on lines 760..769

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

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

              if (
                result.promoCode !== undefined &&
                result.promoCode !== false
              ) {
                listPaymentLine2.append(
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 586..592
view/adminhtml/web/js/public.js on lines 594..598
view/adminhtml/web/js/public.js on lines 600..606
view/adminhtml/web/js/public.js on lines 608..617
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 630..639
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 694..703
view/adminhtml/web/js/public.js on lines 760..769

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

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

              if (
                result.escrowEndDate !== undefined &&
                result.escrowEndDate !== false
              ) {
                listPaymentLine1.append(
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 586..592
view/adminhtml/web/js/public.js on lines 594..598
view/adminhtml/web/js/public.js on lines 600..606
view/adminhtml/web/js/public.js on lines 608..617
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 630..639
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 694..703
view/adminhtml/web/js/public.js on lines 749..758

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

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

              if (result.status !== undefined && result.status !== false) {
                listTransactionLine1.append(
                  '<dl><dt>Status: </dt><dd>' + result.status + '</dd></dl>'
                );
              }
Severity: Major
Found in view/adminhtml/web/js/public.js and 10 other locations - About 45 mins to fix
view/adminhtml/web/js/public.js on lines 578..584
view/adminhtml/web/js/public.js on lines 586..592
view/adminhtml/web/js/public.js on lines 600..606
view/adminhtml/web/js/public.js on lines 608..617
view/adminhtml/web/js/public.js on lines 619..628
view/adminhtml/web/js/public.js on lines 630..639
view/adminhtml/web/js/public.js on lines 641..650
view/adminhtml/web/js/public.js on lines 694..703
view/adminhtml/web/js/public.js on lines 749..758
view/adminhtml/web/js/public.js on lines 760..769

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

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

                case 'last':
                  btnDisplay = lang.sLast;
                  btnClass =
                    button +
                    (page < pages - 1 ? '' : ' ' + classes.sPageButtonDisabled);
Severity: Minor
Found in view/adminhtml/web/js/jquery.dataTables.min.js and 1 other location - About 40 mins to fix
view/adminhtml/web/js/jquery.dataTables.min.js on lines 14147..14152

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

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

                case 'next':
                  btnDisplay = lang.sNext;
                  btnClass =
                    button +
                    (page < pages - 1 ? '' : ' ' + classes.sPageButtonDisabled);
Severity: Minor
Found in view/adminhtml/web/js/jquery.dataTables.min.js and 1 other location - About 40 mins to fix
view/adminhtml/web/js/jquery.dataTables.min.js on lines 14154..14159

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

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 (mydate.length === 5 && event.keyCode !== 8) {
    mydate = mydate + '/';
    field.value = mydate;
  }
Severity: Minor
Found in view/adminhtml/web/js/public.js and 1 other location - About 40 mins to fix
view/adminhtml/web/js/public.js on lines 917..920

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

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

            a.attr('data-content') ||
            ('function' === typeof b.content ? b.content.call(a[0]) : b.content)
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 40 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 1254..1255

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

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

            b.attr('data-original-title') ||
            ('function' === typeof c.title ? c.title.call(b[0]) : c.title));
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 40 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 1374..1375

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

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 (mydate.length === 2 && event.keyCode !== 8) {
    mydate = mydate + '/';
    field.value = mydate;
  }
Severity: Minor
Found in view/adminhtml/web/js/public.js and 1 other location - About 40 mins to fix
view/adminhtml/web/js/public.js on lines 921..924

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

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

                    this.$element.on(
                        i + '.' + this.type,
                        this.options.selector,
                        a.proxy(this.leave, this)
                    );
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 40 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 965..969

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

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

                this.$element.on(
                        h + '.' + this.type,
                        this.options.selector,
                        a.proxy(this.enter, this)
                    ),
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 40 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 970..974

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

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 (data === undefined) {
      // Get
      return ctx.length && this.length
        ? ctx[0].aoData[this[0]]._aData
        : undefined;
Severity: Minor
Found in view/adminhtml/web/js/jquery.dataTables.min.js and 1 other location - About 35 mins to fix
view/adminhtml/web/js/jquery.dataTables.min.js on lines 7959..7973

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

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 (data === undefined) {
      // get
      return ctx.length && this.length
        ? ctx[0].aoData[this[0]]._details
        : undefined;
Severity: Minor
Found in view/adminhtml/web/js/jquery.dataTables.min.js and 1 other location - About 35 mins to fix
view/adminhtml/web/js/jquery.dataTables.min.js on lines 7766..7771

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

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

                case 'previous':
                  btnDisplay = lang.sPrevious;
                  btnClass =
                    button +
                    (page > 0 ? '' : ' ' + classes.sPageButtonDisabled);
Severity: Minor
Found in view/adminhtml/web/js/jquery.dataTables.min.js and 1 other location - About 30 mins to fix
view/adminhtml/web/js/jquery.dataTables.min.js on lines 14133..14138

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

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

        var c =
            b instanceof this.constructor ?
            b :
            a(b.currentTarget).data('bs.' + this.type);
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 30 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 1038..1041

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

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