mambax7/adslight

View on GitHub

Showing 573 of 5,122 total issues

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

        updateHeaderSortCount : function( c, list ) {
            var col, dir, group, indx, primary, temp, val, order,
                sortList = list || c.sortList,
                len = sortList.length;
            c.sortList = [];
Severity: Minor
Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 1 hr to fix

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

        data: function( key, value ) {
            var i, name, data,
                elem = this[ 0 ],
                attrs = elem && elem.attributes;
    
    
    Severity: Minor
    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

      function leverageNative( el, type, expectSync ) {
      
          // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add
          if ( !expectSync ) {
              if ( dataPriv.get( el, type ) === undefined ) {
      Severity: Minor
      Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                getColumnText : function( table, column, callback, rowFilter ) {
                    table = $( table )[0];
                    var tbodyIndex, rowIndex, cache, row, tbodyLen, rowLen, raw, parsed, $cell, result,
                        hasCallback = typeof callback === 'function',
                        allColumns = column === 'all',
        Severity: Minor
        Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                  getColumnText : function( table, column, callback, rowFilter ) {
                      table = $( table )[0];
                      var tbodyIndex, rowIndex, cache, row, tbodyLen, rowLen, raw, parsed, $cell, result,
                          hasCallback = typeof callback === 'function',
                          allColumns = column === 'all',
          Severity: Minor
          Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 1 hr to fix

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

            function adslightMaps(): void
            {
                global $xoopsDB, $xoopsConfig, $xoopsModule, $myts, $prem_perm;
            
                $GLOBALS['xoopsOption']['template_main'] = 'adslight_maps.tpl';
            Severity: Minor
            Found in maps.php - About 1 hr to fix

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

              function adsNewCat($cid): void
              {
                  global $xoopsDB, $myts;
                  $helper = Helper::getInstance();
                  $mytree = new Tree($xoopsDB->prefix('adslight_categories'), 'cid', 'pid');
              Severity: Minor
              Found in admin/category.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

              Method orderBlock has 14 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      array $bid,
                      array $oldtitle,
                      array $oldside,
                      array $oldweight,
                      array $oldvisible,
              Severity: Major
              Found in class/Common/Blocksadmin.php - About 1 hr to fix

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

                jQuery.extend = jQuery.fn.extend = function() {
                    var options, name, src, copy, copyIsArray, clone,
                        target = arguments[ 0 ] || {},
                        i = 1,
                        length = arguments.length,
                Severity: Minor
                Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                  Method makeAdSelBox has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function makeAdSelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = ''): void
                      {
                          global $myts, $xoopsDB;
                          $helper     = Helper::getInstance();
                          $pathIcon16 = Admin::iconUrl('', '16');
                  Severity: Minor
                  Found in class/Tree.php - About 1 hr to fix

                    Method makeMySelBox has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function makeMySelBox($title, $order = '', $preset_id = 0, $none = 0, $sel_name = '', $onchange = ''): void
                        {
                            if ('' === $sel_name) {
                                $sel_name = $this->id;
                            }
                    Severity: Minor
                    Found in class/Tree.php - About 1 hr to fix

                      Method insert has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function insert(\XoopsObject $object, $force = false): bool
                          {
                              global $lid;
                              if (!$object instanceof Pictures) {
                                  return false;
                      Severity: Minor
                      Found in class/PicturesHandler.php - About 1 hr to fix

                        Method updateBlock has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function updateBlock(int $bid, string $btitle, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups)
                            {
                                $myblock = new \XoopsBlock($bid);
                                $myblock->setVar('title', $btitle);
                                $myblock->setVar('weight', $bweight);
                        Severity: Minor
                        Found in class/Common/Blocksadmin.php - About 1 hr to fix

                          Method adslight_absolutize has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function adslight_absolutize($s)
                          {
                              if (preg_match('/\/$/', $_SERVER['REQUEST_URI'])) {
                                  $req_dir = preg_replace('/\/$/', '', $_SERVER['REQUEST_URI']);
                                  $req_php = '';
                          Severity: Minor
                          Found in seo_url.php - About 1 hr to fix

                            Method checkVerModule has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function checkVerModule(Helper $helper, ?string $source = 'github', ?string $default = 'master'): ?array
                                {
                                    $moduleDirName      = \basename(\dirname(__DIR__, 2));
                                    $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
                                    $update             = '';
                            Severity: Minor
                            Found in class/Common/VersionChecks.php - About 1 hr to fix

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

                              function adjustCSS( elem, prop, valueParts, tween ) {
                                  var adjusted, scale,
                                      maxIterations = 20,
                                      currentValue = tween ?
                                          function() {
                              Severity: Minor
                              Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                                var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
                                    var i = 0,
                                        len = elems.length,
                                        bulk = key == null;
                                
                                
                                Severity: Minor
                                Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                                      stop: function( type, clearQueue, gotoEnd ) {
                                          var stopQueue = function( hooks ) {
                                              var stop = hooks.stop;
                                              delete hooks.stop;
                                              stop( gotoEnd );
                                  Severity: Minor
                                  Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                                        style: function( elem, name, value, extra ) {
                                    
                                            // Don't set styles on text and comment nodes
                                            if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
                                                return;
                                    Severity: Minor
                                    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                                              destroy : function( table, removeClasses, callback ) {
                                                  table = $( table )[ 0 ];
                                                  if ( !table.hasInitialized ) { return; }
                                                  // remove all widgets
                                                  ts.removeWidget( table, true, false );
                                      Severity: Minor
                                      Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language