mambax7/adslight

View on GitHub

Showing 573 of 5,122 total issues

Function getColumnData has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        getColumnData : function( table, obj, indx, getCell, $headers ) {
Severity: Minor
Found in assets/js/tablesorter/js/jquery.tablesorter.js - About 35 mins to fix

    Method mailAd has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function mailAd($lid, $yname, $ymail, $fname, $fmail): void
    Severity: Minor
    Found in sendfriend.php - About 35 mins to fix

      Method truncateHtml has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              string $text,
              ?int $length = 100,
              string $ending = '...',
              bool $exact = false,
              bool $considerHtml = true
      Severity: Minor
      Found in class/Common/SysUtility.php - About 35 mins to fix

        Method __construct has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            public function __construct($name, $apiKey, $latitude, $longitude, $zoom)
        Severity: Minor
        Found in class/Form/GoogleMapForm.php - About 35 mins to fix

          Function getSubCats has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function getSubCats($categories): array
              {
                  $helper   = Helper::getInstance();
                  $criteria = new \CriteriaCompo(new \Criteria('pid', '(' . \implode(',', \array_keys($categories)) . ')', 'IN'));
                  $ret      = [];
          Severity: Minor
          Found in class/CategoriesHandler.php - About 35 mins 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 getDirectoryStatus has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function getDirectoryStatus($path, $mode = 0777, $redirectFile = null)
              {
                  global $pathIcon16;
                  $moduleDirName      = \basename(\dirname(__DIR__, 2));
                  $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
          Severity: Minor
          Found in class/Common/DirectoryChecker.php - About 35 mins 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 __construct has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function __construct($target)
              {
                  $this->helper       = $target->helper;
                  $this->targetObject = $target;
          
          
          Severity: Minor
          Found in class/Form/CategoriesForm.php - About 35 mins 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 displayCategory has a Cognitive Complexity of 7 (exceeds 5 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 35 mins 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 __construct has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public function __construct($target)
              {
                  $this->helper       = $target->helper;
                  $this->targetObject = $target;
          
          
          Severity: Minor
          Found in class/Form/ListingForm.php - About 35 mins 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 printAd has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          function printAd($lid): void
          {
              global $xoopsConfig, $xoopsDB, $useroffset, $myts;
              $helper       = Helper::getInstance();
              $currenttheme = $xoopsConfig['theme_set'];
          Severity: Minor
          Found in print.php - About 35 mins 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 getEditor has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              public static function getEditor(?\Xmf\Module\Helper $helper = null, ?array $options = null): ?\XoopsFormTextArea
              {
                  $descEditor = null;
          
                  /** @var Helper $helper */
          Severity: Minor
          Found in class/Common/SysUtility.php - About 35 mins 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

          Avoid too many return statements within this function.
          Open

                      return sortInput ?
                          ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
                          0;
          Severity: Major
          Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                            return this.constructor( context ).find( selector );
            Severity: Major
            Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return root.ready !== undefined ?
                              root.ready( selector ) :
              
                              // Execute immediately if ready is not present
                              selector( jQuery );
              Severity: Major
              Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return value;
                Severity: Major
                Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return elem[ name ];
                  Severity: Major
                  Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                        return results;
                    Severity: Major
                    Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return select( selector.replace( rtrim, "$1" ), context, results, seed );
                      Severity: Major
                      Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return jQuery.makeArray( selector, this );
                        Severity: Major
                        Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                              return results;
                          Severity: Major
                          Found in assets/js/lightbox/js/lightbox-plus-jquery.js - About 30 mins to fix
                            Severity
                            Category
                            Status
                            Source
                            Language