mambax7/adslight

View on GitHub

Showing 573 of 5,122 total issues

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.js - About 1 hr to fix

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

        toggleClass: function( value, stateVal ) {
            var type = typeof value,
                isValidValue = type === "string" || Array.isArray( value );
    
            if ( typeof stateVal === "boolean" && isValidValue ) {
    Severity: Minor
    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

      function on( elem, types, selector, data, fn, one ) {
          var origFn, type;
      
          // Types can be a map of types/handlers
          if ( typeof types === "object" ) {
      Severity: Minor
      Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                applyWidgetId : function( table, id, init ) {
                    table = $(table)[0];
                    var applied, time, name,
                        c = table.config,
                        wo = c.widgetOptions,
        Severity: Minor
        Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                  findRange: function( c, val, ignoreRanges ) {
                      // look for multiple columns '1-3,4-6,8' in data-column
                      var temp, ranges, range, start, end, singles, i, indx, len,
                          columns = [];
                      if ( /^[0-9]+$/.test( val ) ) {
          Severity: Minor
          Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                    findRange: function( c, val, ignoreRanges ) {
                        // look for multiple columns '1-3,4-6,8' in data-column
                        var temp, ranges, range, start, end, singles, i, indx, len,
                            columns = [];
                        if ( /^[0-9]+$/.test( val ) ) {
            Severity: Minor
            Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 1 hr to fix

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

                      applyWidgetId : function( table, id, init ) {
                          table = $(table)[0];
                          var applied, time, name,
                              c = table.config,
                              wo = c.widgetOptions,
              Severity: Minor
              Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 1 hr to fix

                Method displayCategory has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function displayCategory(Categories $categoryObj, $level = 0): void
                    {
                        $helper       = Helper::getInstance();
                        $configurator = new Common\Configurator();
                        $icons        = $configurator->icons;
                Severity: Minor
                Found in class/Utility.php - About 1 hr to fix

                  Function listingDel has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function listingDel($lid, $photo): void
                  {
                      global $xoopsDB;
                      $helper  = Helper::getInstance();
                      $lid     = (int)$lid;
                  Severity: Minor
                  Found in admin/modify_ads.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 replaceLinks has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function replaceLinks($matches): string
                  {
                      $req_string = [];
                      $add_to_url = '';
                      switch ($matches[5]) {
                  Severity: Minor
                  Found in seo_url.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 listingDel has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function listingDel($lid, $photo): void
                  {
                      global $xoopsDB, $admin_lang;
                      $helper = Helper::getInstance();
                  
                  
                  Severity: Minor
                  Found in admin/view_ads.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 listingDel has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function listingDel($lid, $photo): void
                  {
                      global $xoopsDB, $admin_lang;
                      $helper  = Helper::getInstance();
                      $lid     = (int)$lid;
                  Severity: Minor
                  Found in admin/validate_ads.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 index has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function index(): void
                  {
                      global $xoopsDB;
                      $helper = Helper::getInstance();
                  
                  
                  Severity: Minor
                  Found in admin/modify_ads.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 rssDisplay has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                  function rssDisplay(
                      $url,
                      $size = 15,
                      $site = 0
                  ): string {
                  Severity: Minor
                  Found in admin/adsligh_rsslib.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 handleActions has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function handleActions(BlockData $blockData)
                      {
                          $moduleDirNameUpper = \mb_strtoupper(Helper::getInstance()->getDirname());
                          $bid = Request::getInt('bid', 0);
                  
                  
                  Severity: Minor
                  Found in class/Common/BlockActionsHandler.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 isBlockCloned has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function isBlockCloned(int $bid, string $bside, string $bweight, string $bvisible, string $bcachetime, ?array $bmodule, ?array $options, ?array $groups, bool $redirect = true)
                      {
                          \xoops_loadLanguage('admin', 'system');
                          \xoops_loadLanguage('admin/blocksadmin', 'system');
                          \xoops_loadLanguage('admin/groups', 'system');
                  Severity: Minor
                  Found in class/Common/Blocksadmin.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 dispatch has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      dispatch: function( nativeEvent ) {
                  
                          // Make a writable jQuery.Event from the native event object
                          var event = jQuery.event.fix( nativeEvent );
                  
                  
                  Severity: Minor
                  Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

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

                            format: function(table, c, wo) {
                                var $tbody, tbodyIndex, $rows, rows, $row, $cells, remove, indx,
                                $table = c.$table,
                                $tbodies = c.$tbodies,
                                sortList = c.sortList,
                    Severity: Minor
                    Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix

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

                              format: function(table, c, wo) {
                                  var $tbody, tbodyIndex, $rows, rows, $row, $cells, remove, indx,
                                  $table = c.$table,
                                  $tbodies = c.$tbodies,
                                  sortList = c.sortList,
                      Severity: Minor
                      Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 1 hr to fix

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

                                appendCache : function( c, init ) {
                                    var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
                                        table = c.table,
                                        $tbodies = c.$tbodies,
                                        rows = [],
                        Severity: Minor
                        Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language