pagseguro/magento2

View on GitHub

Showing 385 of 385 total issues

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

    (c.prototype.arrow = function() {
        return (this.$arrow = this.$arrow || this.tip().find('.arrow'));
    });
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 50 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 1272..1274

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

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.support.transition && g.hasClass('fade') ?
                g
                .one('bsTransitionEnd', c)
                .emulateTransitionEnd(d.TRANSITION_DURATION) :
                c());
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 50 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 1185..1189

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

  _api_registerPlural('columns().header()', 'column().header()', function (
    selector,
    opts
  ) {
    return this.iterator(
Severity: Minor
Found in view/adminhtml/web/js/jquery.dataTables.min.js and 1 other location - About 50 mins to fix
view/adminhtml/web/js/jquery.dataTables.min.js on lines 8226..8237

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

                a.support.transition && f.hasClass('fade') ?
                f
                .one('bsTransitionEnd', d)
                .emulateTransitionEnd(c.TRANSITION_DURATION) :
                d(),
Severity: Minor
Found in view/frontend/web/js/bootstrap.min.js and 1 other location - About 50 mins to fix
view/frontend/web/js/bootstrap.min.js on lines 87..91

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

  _api_registerPlural('columns().footer()', 'column().footer()', function (
    selector,
    opts
  ) {
    return this.iterator(
Severity: Minor
Found in view/adminhtml/web/js/jquery.dataTables.min.js and 1 other location - About 50 mins to fix
view/adminhtml/web/js/jquery.dataTables.min.js on lines 8213..8224

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

Avoid deeply nested control flow statements.
Open

              for (var j = 0, jLen = val.length; j < jLen; j++) {
                o = {};
                setData(o, val[j], innerSrc);
                data[a[i]].push(o);
              }
Severity: Major
Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

              if (
                (tmp === -1 && search === 'removed') ||
                (tmp >= 0 && search === 'applied')
              ) {
                a.push(i);
    Severity: Major
    Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                  if (detectedType === 'html') {
                    break;
                  }
      Severity: Major
      Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                  } else if (typeof aTargets[j] === 'number' && aTargets[j] < 0) {
                    /* Negative integer, right to left column counting */
                    fn(columns.length + aTargets[j], def);
                  } else if (typeof aTargets[j] === 'string') {
                    /* Class name matching on TH element */
        Severity: Major
        Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                      if (typeof cellData !== 'string' && cellData.toString) {
                        cellData = cellData.toString();
                      }
          Severity: Major
          Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                          if (
                            s(
                              o,
                              _fnGetCellData(settings, row, j),
                              host.anCells ? host.anCells[j] : null
            Severity: Major
            Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

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

                    _: function (settings, host, idx, buttons, page, pages) {
              Severity: Minor
              Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                            if (data === null || data[a[i]] === undefined) {
                              return undefined;
                            }
                Severity: Major
                Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              for (k = 0; k < iRowspan; k++) {
                                aApplied[i + k][j + iColspan] = 1;
                              }
                  Severity: Major
                  Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                for (k = 0; k < iRowspan; k++) {
                                  aLayout[i + k][iColShifted + l] = {
                                    cell: nCell,
                                    unique: bUnique,
                                  };
                    Severity: Major
                    Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                if (type === 'column-rows') {
                                  rows = _selector_row_indexes(context[i], selector.opts);
                                }
                      Severity: Major
                      Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                    if (fomatters[column.sType]) {
                                      cellData = fomatters[column.sType](cellData);
                                    }
                        Severity: Major
                        Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

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

                            function _fnFilter(settings, input, force, regex, smart, caseInsensitive) {
                          Severity: Minor
                          Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                        if (!detectedType && j !== types.length - 1) {
                                          break;
                                        }
                            Severity: Major
                            Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                        if (cOption === aoFeatures[k].cFeature) {
                                          featureNode = aoFeatures[k].fnInit(oSettings);
                                          break;
                                        }
                              Severity: Major
                              Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 45 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language