mambax7/adslight

View on GitHub

Showing 573 of 5,122 total issues

Method listingDel has 29 lines of code (exceeds 25 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

    Method adsAddCat has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        $title,
        $cat_desc,
        $cat_keywords,
        $cid,
        $img,
    Severity: Major
    Found in admin/category.php - About 1 hr to fix

      Method receivePicture has 9 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              $title,
              $pathUpload,
              $thumbwidth,
              $thumbheight,
              $pictwidth,
      Severity: Major
      Found in class/PicturesHandler.php - About 1 hr to fix

        Method isBlockCloned has 9 arguments (exceeds 4 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)
        Severity: Major
        Found in class/Common/Blocksadmin.php - About 1 hr to fix

          Method updateBlock has 9 arguments (exceeds 4 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)
          Severity: Major
          Found in class/Common/Blocksadmin.php - About 1 hr to fix

            Function finish has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                finish: function( type ) {
                    if ( type !== false ) {
                        type = type || "fx";
                    }
                    return this.each( function() {
            Severity: Minor
            Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

              Function off has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  off: function( types, selector, fn ) {
                      var handleObj, type;
                      if ( types && types.preventDefault && types.handleObj ) {
              
                          // ( event )  dispatched jQuery.Event
              Severity: Minor
              Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                Function parseHTML has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                jQuery.parseHTML = function( data, context, keepScripts ) {
                    if ( typeof data !== "string" ) {
                        return [];
                    }
                    if ( typeof context === "boolean" ) {
                Severity: Minor
                Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                  Function range has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                              range : function( c, data ) {
                                  if ( tsfRegex.toTest.test( data.iFilter ) ) {
                                      var result, tmp, range1, range2,
                                          table = c.table,
                                          index = data.index,
                  Severity: Minor
                  Found in assets/js/tablesorter/js/jquery.tablesorter.widgets.js - About 1 hr to fix

                    Function range has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                range : function( c, data ) {
                                    if ( tsfRegex.toTest.test( data.iFilter ) ) {
                                        var result, tmp, range1, range2,
                                            table = c.table,
                                            index = data.index,
                    Severity: Minor
                    Found in assets/js/tablesorter/js/jquery.tablesorter.combined.js - About 1 hr to fix

                      Method convertOrderByIn has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static function convertOrderByIn($orderby): string
                          {
                              switch (\trim($orderby)) {
                                  case 'titleA':
                                      $orderby = 'title ASC';
                      Severity: Minor
                      Found in class/Utility.php - About 1 hr to fix

                        Function getCategoriesCount has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function getCategoriesCount($pid = 0): int
                            {
                                if (-1 == $pid) {
                                    return $this->getCount();
                                }
                        Severity: Minor
                        Found in class/CategoriesHandler.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 insert has a Cognitive Complexity of 10 (exceeds 5 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

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

                        function propFilter( props, specialEasing ) {
                            var index, name, easing, value, hooks;
                        
                            // camelCase, specialEasing and expand cssHook pass
                            for ( index in props ) {
                        Severity: Minor
                        Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                          Function updateNav has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            Lightbox.prototype.updateNav = function() {
                              // Check to see if the browser supports touch events. If so, we take the conservative approach
                              // and assume that mouse hover events are not supported and always show prev/next navigation
                              // arrows in image sets.
                              var alwaysShowNav = false;
                          Severity: Minor
                          Found in assets/js/lightbox/js/lightbox.js - About 1 hr to fix

                            Function position has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                position: function() {
                                    if ( !this[ 0 ] ) {
                                        return;
                                    }
                            
                            
                            Severity: Minor
                            Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                              Function updateNav has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                Lightbox.prototype.updateNav = function() {
                                  // Check to see if the browser supports touch events. If so, we take the conservative approach
                                  // and assume that mouse hover events are not supported and always show prev/next navigation
                                  // arrows in image sets.
                                  var alwaysShowNav = false;
                              Severity: Minor
                              Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                                Function when has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    when: function( singleValue ) {
                                        var
                                
                                            // count of uncompleted subordinates
                                            remaining = arguments.length,
                                Severity: Minor
                                Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                                  Function addClass has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      addClass: function( value ) {
                                          var classes, elem, cur, curValue, clazz, j, finalValue,
                                              i = 0;
                                  
                                          if ( isFunction( value ) ) {
                                  Severity: Minor
                                  Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix

                                    Function clone has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        clone: function( elem, dataAndEvents, deepDataAndEvents ) {
                                            var i, l, srcElements, destElements,
                                                clone = elem.cloneNode( true ),
                                                inPage = isAttached( elem );
                                    
                                    
                                    Severity: Minor
                                    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language