pagseguro/magento2

View on GitHub

Showing 261 of 385 total issues

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 __details_events has 46 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      var __details_events = function (settings) {
        var api = new _Api(settings);
        var namespace = '.dt.DT_details';
        var drawEvent = 'draw' + namespace;
        var colvisEvent = 'column-visibility' + namespace;
    Severity: Minor
    Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

      Function Installments has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              Installments: function (url, id, brand, isInternational) {
                jQuery
                  .ajax({
                    url: url + 'pagseguro/direct/installments',
                    data: {
      Severity: Minor
      Found in view/frontend/web/js/public.js - About 1 hr to fix

        Function _fnSortListener has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          function _fnSortListener(settings, colIdx, append, callback) {
            var col = settings.aoColumns[colIdx];
            var sorting = settings.aaSorting;
            var asSorting = col.asSorting;
            var nextSortIdx;
        Severity: Minor
        Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

          Function _fnDetectHeader has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            function _fnDetectHeader(aLayout, nThead) {
              var nTrs = $(nThead).children('tr');
              var nTr, nCell;
              var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
              var bUnique;
          Severity: Minor
          Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

            Function _fnBuildHead has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function _fnBuildHead(oSettings) {
                var i, ien, cell, row, column;
                var thead = oSettings.nTHead;
                var tfoot = oSettings.nTFoot;
                var createHeader = $('th, td', thead).length === 0;
            Severity: Minor
            Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

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

                var _selector_row_indexes = function (settings, opts) {
                  var i,
                    ien,
                    tmp,
                    a = [],
              Severity: Minor
              Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

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

                    (c.prototype.slide = function(b, d) {
                        var e = this.$element.find('.item.active'),
                            f = d || this.getItemForDirection(b, e),
                            g = this.interval,
                            h = 'next' === b ? 'left' : 'right',
                Severity: Minor
                Found in view/frontend/web/js/bootstrap.min.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

                    Method install has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
                        {
                            /**
                             * Prepare database for install
                             */
                    Severity: Minor
                    Found in Setup/InstallData.php - About 1 hr to fix

                      Function request has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function request()
                          {
                              //load payments by date
                              $this->getPagSeguroAbandoned();
                      
                      
                      Severity: Minor
                      Found in Model/Transactions/Methods/Abandoned.php - 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 _fnFeatureHtmlPaginate has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        function _fnFeatureHtmlPaginate(settings) {
                          var type = settings.sPaginationType,
                            plugin = DataTable.ext.pager[type],
                            modern = typeof plugin === 'function',
                            redraw = function (settings) {
                      Severity: Minor
                      Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

                        Function __row_selector has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var __row_selector = function (settings, selector, opts) {
                            var run = function (sel) {
                              var selInt = _intVal(sel);
                              var i, ien;
                        
                        
                        Severity: Minor
                        Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

                          Function backdrop has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              (c.prototype.backdrop = function(b) {
                                  var d = this,
                                      e = this.$element.hasClass('fade') ? 'fade' : '';
                                  if (this.isShown && this.options.backdrop) {
                                      var f = a.support.transition && e;
                          Severity: Minor
                          Found in view/frontend/web/js/bootstrap.min.js - About 1 hr to fix

                            Function _fnFilterData has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              function _fnFilterData(settings) {
                                var columns = settings.aoColumns;
                                var column;
                                var i, j, ien, jen, filterData, cellData, row;
                                var fomatters = DataTable.ext.type.search;
                            Severity: Minor
                            Found in view/adminhtml/web/js/jquery.dataTables.min.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 placeOrder has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    placeOrder: function () {
                                      var self = this;
                                      var paymentData = quote.paymentMethod();
                                      var messageContainer = this.messageContainer;
                                      // remove previous token error message if it exists

                                  Function _fnGetCellData has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    function _fnGetCellData(settings, rowIdx, colIdx, type) {
                                      var draw = settings.iDraw;
                                      var col = settings.aoColumns[colIdx];
                                      var rowData = settings.aoData[rowIdx]._aData;
                                      var defaultContent = col.sDefaultContent;
                                  Severity: Minor
                                  Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

                                    Function run has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        var run = function (sel) {
                                          var selInt = _intVal(sel);
                                          var i, ien;
                                    
                                          // Short cut - selector is a number and no options provided (default is
                                    Severity: Minor
                                    Found in view/adminhtml/web/js/jquery.dataTables.min.js - About 1 hr to fix

                                      Function placeOrder has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          placeOrder: function () {
                                            var self = this;
                                            var paymentData = quote.paymentMethod();
                                            var messageContainer = this.messageContainer;
                                            fullScreenLoader.startLoader();
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language