pagseguro/magento2

View on GitHub
view/adminhtml/web/js/public.js

Summary

Maintainability
F
1 wk
Test Coverage

File public.js has 919 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 *
 * Modals
 *
 */
Severity: Major
Found in view/adminhtml/web/js/public.js - About 2 days to fix

    Function Details has 313 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          Details: function (url, transaction_code, order) {
            jQuery
              .ajax({
                url: url + '/pagseguro/transactions/transaction',
                type: 'POST',
    Severity: Major
    Found in view/adminhtml/web/js/public.js - About 1 day to fix

      Function Refund has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            Refund: function (url, data, row, value = null) {
              var t = jQuery('#pagseguro-datatable').DataTable();
              jQuery
                .ajax({
                  url: url + '/pagseguro/refund/refund',
      Severity: Major
      Found in view/adminhtml/web/js/public.js - About 2 hrs to fix

        Function Search has 58 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              Search: function (url) {
                jQuery
                  .ajax({
                    url: url + '/pagseguro/transactions/request',
                    data: {
        Severity: Major
        Found in view/adminhtml/web/js/public.js - About 2 hrs to fix

          Function Search has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                Search: function (url) {
                  jQuery
                    .ajax({
                      url: url + '/pagseguro/refund/request',
                      data: {
          Severity: Major
          Found in view/adminhtml/web/js/public.js - About 2 hrs to fix

            Function Search has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  Search: function (url) {
                    jQuery
                      .ajax({
                        url: url + '/pagseguro/conciliation/request',
                        data: {
            Severity: Minor
            Found in view/adminhtml/web/js/public.js - About 1 hr to fix

              Function Search has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                    Search: function (url) {
                      jQuery
                        .ajax({
                          url: url + '/pagseguro/abandoned/request',
                          data: {
              Severity: Minor
              Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                Function Search has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      Search: function (url) {
                        jQuery
                          .ajax({
                            url: url + '/pagseguro/cancellation/request',
                            data: {
                Severity: Minor
                Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                    if (
                      isNaN(day) ||
                      day < 01 ||
                      ((day < 01 || day > 30) &&
                        (month === 04 || month === 06 || month === 09 || month === 11)) ||
                  Severity: Critical
                  Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                    Function Transport has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          Transport: function (url) {
                            var t = jQuery('#pagseguro-datatable').DataTable();
                            var rows = jQuery('#pagseguro-datatable').find(
                              '[data-target=abandoned]:checked'
                            );
                    Severity: Minor
                    Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                      Function Conciliate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                            Conciliate: function (url) {
                              var t = jQuery('#pagseguro-datatable').DataTable();
                              var rows = jQuery('#pagseguro-datatable').find(
                                '[data-target=conciliation]:checked'
                              );
                      Severity: Minor
                      Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                        Function dateVerify has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function dateVerify(fieldName) {
                          day = fieldName.value.substring(0, 2);
                          month = fieldName.value.substring(3, 5);
                          year = fieldName.value.substring(6, 10);
                        
                        
                        Severity: Minor
                        Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function dateVerify has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function dateVerify(fieldName) {
                          day = fieldName.value.substring(0, 2);
                          month = fieldName.value.substring(3, 5);
                          year = fieldName.value.substring(6, 10);
                        
                        
                        Severity: Minor
                        Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                          Function Cancel has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                Cancel: function (url, data, row) {
                                  var t = jQuery('#pagseguro-datatable').DataTable();
                          
                                  jQuery
                                    .ajax({
                          Severity: Minor
                          Found in view/adminhtml/web/js/public.js - About 1 hr to fix

                            Consider simplifying this complex logical expression.
                            Open

                              if (
                                isNaN(year) ||
                                (month === 2 &&
                                  (day < 01 || day > 29 || (day > 28 && parseInt((year / 4),10) !== year / 4)))
                              ) {
                            Severity: Major
                            Found in view/adminhtml/web/js/public.js - About 40 mins to fix

                              Function dateMask has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                              Open

                              function dateMask(date, fieldName) {
                                var mydate = '';
                                var field = document.getElementById(fieldName);
                                mydate = mydate + date;
                                if (mydate.length === 2 && event.keyCode !== 8) {
                              Severity: Minor
                              Found in view/adminhtml/web/js/public.js - About 25 mins to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

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

                                            if (
                                              result.creditorFees.comissionFeeAmount !== undefined &&
                                              result.creditorFees.comissionFeeAmount !== false
                                            ) {
                                              listData.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 4 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 836..845
                              view/adminhtml/web/js/public.js on lines 847..856
                              view/adminhtml/web/js/public.js on lines 858..867
                              view/adminhtml/web/js/public.js on lines 869..878

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.creditorFees.intermediationRateAmount !== undefined &&
                                              result.creditorFees.intermediationRateAmount !== false
                                            ) {
                                              listData.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 4 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 836..845
                              view/adminhtml/web/js/public.js on lines 847..856
                              view/adminhtml/web/js/public.js on lines 869..878
                              view/adminhtml/web/js/public.js on lines 880..889

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.creditorFees.installmentFeeAmount !== undefined &&
                                              result.creditorFees.installmentFeeAmount !== false
                                            ) {
                                              listData.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 4 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 847..856
                              view/adminhtml/web/js/public.js on lines 858..867
                              view/adminhtml/web/js/public.js on lines 869..878
                              view/adminhtml/web/js/public.js on lines 880..889

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.creditorFees.intermediationFeeAmount !== undefined &&
                                              result.creditorFees.intermediationFeeAmount !== false
                                            ) {
                                              listData.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 4 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 836..845
                              view/adminhtml/web/js/public.js on lines 847..856
                              view/adminhtml/web/js/public.js on lines 858..867
                              view/adminhtml/web/js/public.js on lines 880..889

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.creditorFees.operationalFeeAmount !== undefined &&
                                              result.creditorFees.operationalFeeAmount !== false
                                            ) {
                                              listData.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 4 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 836..845
                              view/adminhtml/web/js/public.js on lines 858..867
                              view/adminhtml/web/js/public.js on lines 869..878
                              view/adminhtml/web/js/public.js on lines 880..889

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 66.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      jQuery
                                        .ajax({
                                          url: url + '/pagseguro/abandoned/request',
                                          data: {
                                            form_key: window.FORM_KEY,
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 27..82
                              view/adminhtml/web/js/public.js on lines 255..306
                              view/adminhtml/web/js/public.js on lines 347..409

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      jQuery
                                        .ajax({
                                          url: url + '/pagseguro/conciliation/request',
                                          data: {
                                            form_key: window.FORM_KEY,
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 141..195
                              view/adminhtml/web/js/public.js on lines 255..306
                              view/adminhtml/web/js/public.js on lines 347..409

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      jQuery
                                        .ajax({
                                          url: url + '/pagseguro/refund/request',
                                          data: {
                                            form_key: window.FORM_KEY,
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 27..82
                              view/adminhtml/web/js/public.js on lines 141..195
                              view/adminhtml/web/js/public.js on lines 255..306

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      jQuery
                                        .ajax({
                                          url: url + '/pagseguro/cancellation/request',
                                          data: {
                                            form_key: window.FORM_KEY,
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 27..82
                              view/adminhtml/web/js/public.js on lines 141..195
                              view/adminhtml/web/js/public.js on lines 347..409

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

                              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 Modal = {
                                Load: function (title, content) {
                                  require(['Magento_Ui/js/modal/alert'], function (alert) {
                                    alert({
                                      title: title,
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 1 other location - About 1 hr to fix
                              view/frontend/web/js/public.js on lines 6..16

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

                              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 (
                                              result.paymentMethod.titleType !== undefined &&
                                              result.paymentMethod.titleType !== false
                                            ) {
                                              listPaymentLine1.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 1 other location - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 671..680

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 62.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.paymentMethod.titleCode !== undefined &&
                                              result.paymentMethod.titleCode !== false
                                            ) {
                                              listPaymentLine1.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 1 other location - About 1 hr to fix
                              view/adminhtml/web/js/public.js on lines 660..669

                              Duplicated Code

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

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

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

                              Tuning

                              This issue has a mass of 62.

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

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

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

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

                              Refactorings

                              Further Reading

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

                                      jQuery
                                        .ajax({
                                          url: url + '/pagseguro/abandoned/transport',
                                          data: { form_key: window.FORM_KEY, data: data },
                                          type: 'POST',
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 2 other locations - About 55 mins to fix
                              view/adminhtml/web/js/public.js on lines 101..132
                              view/adminhtml/web/js/public.js on lines 311..338

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.grossAmount !== undefined &&
                                              result.grossAmount !== false
                                            ) {
                                              listPaymentLine2.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 55 mins to fix
                              view/adminhtml/web/js/public.js on lines 705..714
                              view/adminhtml/web/js/public.js on lines 716..725
                              view/adminhtml/web/js/public.js on lines 738..747

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.discountAmount !== undefined &&
                                              result.discountAmount !== false
                                            ) {
                                              listPaymentLine2.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 55 mins to fix
                              view/adminhtml/web/js/public.js on lines 705..714
                              view/adminhtml/web/js/public.js on lines 727..736
                              view/adminhtml/web/js/public.js on lines 738..747

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.extraAmount !== undefined &&
                                              result.extraAmount !== false
                                            ) {
                                              listPaymentLine2.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 55 mins to fix
                              view/adminhtml/web/js/public.js on lines 716..725
                              view/adminhtml/web/js/public.js on lines 727..736
                              view/adminhtml/web/js/public.js on lines 738..747

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

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

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

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

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

                              Refactorings

                              Further Reading

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

                                            if (
                                              result.netAmount !== undefined &&
                                              result.netAmount !== false
                                            ) {
                                              listPaymentLine2.append(
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 3 other locations - About 55 mins to fix
                              view/adminhtml/web/js/public.js on lines 705..714
                              view/adminhtml/web/js/public.js on lines 716..725
                              view/adminhtml/web/js/public.js on lines 727..736

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

                              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

                                      jQuery
                                        .ajax({
                                          url: url + '/pagseguro/conciliation/conciliate',
                                          data: { form_key: window.FORM_KEY, data: data },
                                          type: 'POST',
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 2 other locations - About 55 mins to fix
                              view/adminhtml/web/js/public.js on lines 212..246
                              view/adminhtml/web/js/public.js on lines 311..338

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

                              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

                                      jQuery
                                        .ajax({
                                          url: url + '/pagseguro/cancellation/cancel',
                                          data: { form_key: window.FORM_KEY, data: data },
                                          type: 'POST',
                              Severity: Major
                              Found in view/adminhtml/web/js/public.js and 2 other locations - About 55 mins to fix
                              view/adminhtml/web/js/public.js on lines 101..132
                              view/adminhtml/web/js/public.js on lines 212..246

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

                              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.lastEventDate !== undefined &&
                                              result.lastEventDate !== 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 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.itemCount !== undefined &&
                                              result.itemCount !== 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 630..639
                              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.date !== undefined && result.date !== false) {
                                              listTransactionLine1.append(
                                                '<dl class=""><dt>Data e hora: </dt><dd>' +
                                                  result.date +
                                                  '</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 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
                              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.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

                                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

                                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

                              There are no issues that match your filters.

                              Category
                              Status