XoopsModules25x/tag

View on GitHub

Showing 105 of 1,477 total issues

Method setOrder has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    public function setOrder(string $bid, string $title, string $weight, string $visible, string $side, string $bcachetime, ?array $bmodule = null): void
Severity: Major
Found in class/Common/Blocksadmin.php - About 50 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                if (is_file($templateFolder . $v)) {
                                    unlink($templateFolder . $v);
                                }
    Severity: Major
    Found in include/onupdate.php - About 45 mins to fix

      Function render has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

          public function render(): string
          {
              //        $ele_name = $this->getName();
              $ret    = "<div>\n";
              $hidden = '';
      Severity: Minor
      Found in class/BlockForm.php - About 45 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

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

          public function __construct($caption, $name, $size, $maxlength, $value = '', string $type = 'text')
      Severity: Minor
      Found in class/FormValidatedInput.php - About 45 mins to fix

        Consider simplifying this complex logical expression.
        Open

        if (!defined('TAG_FUNCTIONS_RECON')) :
            define('TAG_FUNCTIONS_RECON', 1);
        
            function tag_synchronization(): bool
            {
        Severity: Major
        Found in include/functions.recon.php - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                      if ($oldtitle[$i] !== $title[$i]
                          || $oldweight[$i] !== $weight[$i]
                          || $oldvisible[$i] !== $visible[$i]
                          || $oldside[$i] !== $side[$i]
                          || $oldbcachetime[$i] !== $bcachetime[$i]
          Severity: Major
          Found in class/Common/Blocksadmin.php - About 40 mins to fix

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

            function tag_search($queryarray, $andor, $limit, $offset, $userid)
            Severity: Minor
            Found in include/search.inc.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 getByLimit has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    public function &getByLimit($limit = Constants::UNLIMITED, $start = Constants::BEGINNING, \CriteriaElement $criteria = null, $fields = null, $fromStats = true): ?array
                Severity: Minor
                Found in class/TagHandler.php - About 35 mins to fix

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

                      public function __construct($name, $size, $maxlength, $value = null, $catid = 0)
                  Severity: Minor
                  Found in include/formtag.php - About 35 mins to fix

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

                        public function __construct($name, int $size, $maxlength, $value = '', $catid = 0)
                    Severity: Minor
                    Found in class/FormTag.php - About 35 mins to fix

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

                      function article_tag_iteminfo(array &$items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in plugin/article.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 myalbum2_tag_iteminfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function myalbum2_tag_iteminfo(array &$items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in plugin/myalbum2.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 myalbum1_tag_iteminfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function myalbum1_tag_iteminfo(array &$items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in plugin/myalbum1.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 publisher_tag_iteminfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function publisher_tag_iteminfo(array &$items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in plugin/publisher.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

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

                      function smartsection_tag_iteminfo(array &$items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in plugin/smartsection.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 myalbum_tag_iteminfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function myalbum_tag_iteminfo(array &$items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in plugin/myalbum.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 mymodule_tag_iteminfo has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function mymodule_tag_iteminfo(array $items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in sample.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 tag_define_url_delimiter has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                      Open

                      function tag_define_url_delimiter(): void
                      {
                          $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1);
                          trigger_error(__FUNCTION__ . " is deprecated, called from {$trace[0]['file']} line {$trace[0]['line']}");
                          $GLOBALS['xoopsLogger']->addDeprecated(
                      Severity: Minor
                      Found in include/functions.ini.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

                      Severity
                      Category
                      Status
                      Source
                      Language