mambax7/adslight

View on GitHub

Showing 573 of 5,122 total issues

Function changeImage has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  Lightbox.prototype.changeImage = function(imageNumber) {
    var self = this;
    var filename = this.album[imageNumber].link;
    var filetype = filename.split('.').slice(-1)[0];
    var $image = this.$lightbox.find('.lb-image');
Severity: Major
Found in assets/js/lightbox/js/lightbox.js - About 2 hrs to fix

    Function changeImage has 61 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Lightbox.prototype.changeImage = function(imageNumber) {
        var self = this;
        var filename = this.album[imageNumber].link;
        var filetype = filename.split('.').slice(-1)[0];
        var $image = this.$lightbox.find('.lb-image');
    Severity: Major
    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 2 hrs to fix

      Function multisort has 61 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              multisort : function( c ) { /*jshint loopfunc:true */
                  var tbodyIndex, sortTime, colMax, rows, tmp,
                      table = c.table,
                      sorter = [],
                      dir = 0,
      Severity: Major
      Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 2 hrs to fix

        Function multisort has 61 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                multisort : function( c ) { /*jshint loopfunc:true */
                    var tbodyIndex, sortTime, colMax, rows, tmp,
                        table = c.table,
                        sorter = [],
                        dir = 0,
        Severity: Major
        Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 2 hrs to fix

          Function index has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

          function index(): void
          {
              global $xoopsDB, $myts, $admin_lang;
              //    require_once __DIR__ . '/admin_header.php';
              xoops_cp_header();
          Severity: Minor
          Found in admin/options.php - About 2 hrs 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 deleteDirectory has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function deleteDirectory(string $src): bool
              {
                  // Only continue if user is a 'global' Admin
                  if (!($GLOBALS['xoopsUser'] instanceof \XoopsUser) || !$GLOBALS['xoopsUser']->isAdmin()) {
                      return false;
          Severity: Minor
          Found in class/Common/FilesManagement.php - About 2 hrs 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 getAllPictures has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getAllPictures(
                  $criteria = [],
                  $asobject = false,
                  $sort = 'cod_img',
                  $cat_order = 'ASC',
          Severity: Minor
          Found in class/Pictures.php - About 2 hrs 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 domManip has 60 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function domManip( collection, args, callback, ignored ) {
          
              // Flatten any nested arrays
              args = concat.apply( [], args );
          
          
          Severity: Major
          Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 2 hrs to fix

            Function addRows has 60 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    addRows : function( c, $row, resort, callback ) {
                        var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order,
                            cacheIndex, rowData, cells, cell, span,
                            // allow passing a row string if only one non-info tbody exists in the table
                            valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ),
            Severity: Major
            Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 2 hrs to fix

              Function addRows has 60 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      addRows : function( c, $row, resort, callback ) {
                          var txt, val, tbodyIndex, rowIndex, rows, cellIndex, len, order,
                              cacheIndex, rowData, cells, cell, span,
                              // allow passing a row string if only one non-info tbody exists in the table
                              valid = typeof $row === 'string' && c.$tbodies.length === 1 && /<tr/.test( $row || '' ),
              Severity: Major
              Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 2 hrs to fix

                Method __construct has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function __construct($target)
                    {
                        $this->helper       = $target->helper;
                        $this->targetObject = $target;
                
                
                Severity: Major
                Found in class/Form/CategoriesForm.php - About 2 hrs to fix

                  Method modifyAds has 19 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      $lid,
                      $cat,
                      $title,
                      $status,
                      $expire,
                  Severity: Major
                  Found in modify.php - About 2 hrs to fix

                    Function ajaxConvert has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function ajaxConvert( s, response, jqXHR, isSuccess ) {
                        var conv2, current, conv, tmp, prev,
                            converters = {},
                    
                            // Work with a copy of dataTypes in case we need to modify it for conversion
                    Severity: Major
                    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 2 hrs to fix

                      Function getFilters has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
                              var i, $filters, $column, cols,
                                  filters = [],
                                  c = table ? $( table )[0].config : '',
                                  wo = c ? c.widgetOptions : '';
                      Severity: Major
                      Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

                        Function getFilters has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
                                var i, $filters, $column, cols,
                                    filters = [],
                                    c = table ? $( table )[0].config : '',
                                    wo = c ? c.widgetOptions : '';
                        Severity: Major
                        Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 2 hrs to fix

                          Consider simplifying this complex logical expression.
                          Open

                                          if ( table.config.widgetOptions.filter_initialized &&
                                              // immediate search if user presses enter
                                              ( event.which === tskeyCodes.enter ||
                                                  // immediate search if a "search" or "blur" is triggered on the input
                                                  ( eventType === 'search' || eventType === 'blur' ) ||
                          Severity: Critical
                          Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

                            Consider simplifying this complex logical expression.
                            Open

                                            if ( table.config.widgetOptions.filter_initialized &&
                                                // immediate search if user presses enter
                                                ( event.which === tskeyCodes.enter ||
                                                    // immediate search if a "search" or "blur" is triggered on the input
                                                    ( eventType === 'search' || eventType === 'blur' ) ||
                            Severity: Critical
                            Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 2 hrs to fix

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

                                  ts.storage = function(table, key, value, options) {
                                      table = $(table)[0];
                                      var cookieIndex, cookies, date,
                                          hasStorage = false,
                                          values = {},
                              Severity: Major
                              Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 2 hrs to fix

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

                                    ts.storage = function(table, key, value, options) {
                                        table = $(table)[0];
                                        var cookieIndex, cookies, date,
                                            hasStorage = false,
                                            values = {},
                                Severity: Major
                                Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 2 hrs to fix

                                  Function bindings has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          bindings : function( c, wo ) {
                                              var namespace = c.namespace + 'tsresize';
                                              wo.$resizable_container.children().bind( 'mousedown', function( event ) {
                                                  // save header cell and mouse position
                                                  var column,
                                  Severity: Major
                                  Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 2 hrs to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language