XoopsModules25x/tag

View on GitHub

Showing 105 of 1,477 total issues

Function smartfaq_tag_iteminfo has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

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

Method myalbum0_tag_iteminfo has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function myalbum0_tag_iteminfo(array &$items): bool
{
    if (empty($items)) {
        return false;
    }
Severity: Minor
Found in plugin/myalbum0.php - About 1 hr to fix

    Method xoops_module_pre_install_tag has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function xoops_module_pre_install_tag(\XoopsModule $module): bool
    {
        $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/action.module.php - About 1 hr to fix

      Method xmnews_tag_iteminfo has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function xmnews_tag_iteminfo(array &$items): bool
      {
          if (empty($items)) {
              return false;
          }
      Severity: Minor
      Found in plugin/xmnews.php - About 1 hr to fix

        Method smartfaq_tag_iteminfo has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function smartfaq_tag_iteminfo(array &$items): bool
        {
            if (empty($items) || !is_array($items)) {
                return false;
            }
        Severity: Minor
        Found in plugin/smartfaq.php - About 1 hr to fix

          Method getServerStats has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static function getServerStats(): string
              {
                  //mb    $wfdownloads = WfdownloadsWfdownloads::getInstance();
                  $moduleDirName      = \basename(\dirname(__DIR__, 2));
                  $moduleDirNameUpper = \mb_strtoupper($moduleDirName);
          Severity: Minor
          Found in class/Common/ServerStats.php - About 1 hr to fix

            Method xforum_tag_iteminfo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function xforum_tag_iteminfo(array &$items): bool
            {
                if (empty($items)) {
                    return false;
                }
            Severity: Minor
            Found in plugin/xforum.php - About 1 hr to fix

              Method xfaq_tag_iteminfo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function xfaq_tag_iteminfo(array &$items): bool
              {
                  if (empty($items)) {
                      return false;
                  }
              Severity: Minor
              Found in plugin/xfaq.php - About 1 hr to fix

                Method myalbum1_tag_iteminfo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function myalbum1_tag_iteminfo(array &$items): bool
                {
                    if (empty($items)) {
                        return false;
                    }
                Severity: Minor
                Found in plugin/myalbum1.php - About 1 hr to fix

                  Method myalbum2_tag_iteminfo has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function myalbum2_tag_iteminfo(array &$items): bool
                  {
                      if (empty($items)) {
                          return false;
                      }
                  Severity: Minor
                  Found in plugin/myalbum2.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): void
                    Severity: Major
                    Found in class/Common/Blocksadmin.php - About 1 hr to fix

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

                      function extgallery_tag_iteminfo(array &$items): bool
                      {
                          if (empty($items)) {
                              return false;
                          }
                      Severity: Minor
                      Found in plugin/extgallery.php - About 1 hr to fix

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

                        function tdmdownloads_tag_iteminfo(array &$items): bool
                        {
                            if (empty($items)) {
                                return false;
                            }
                        Severity: Minor
                        Found in plugin/tdmdownloads.php - About 1 hr to fix

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

                          function xnews_tag_iteminfo(array &$items): bool
                          {
                              if (empty($items)) {
                                  return false;
                              }
                          Severity: Minor
                          Found in plugin/xnews.php - About 1 hr to fix

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

                            function myalbum_tag_iteminfo(array &$items): bool
                            {
                                if (empty($items)) {
                                    return false;
                                }
                            Severity: Minor
                            Found in plugin/myalbum.php - About 1 hr to fix

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

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

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

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

                              function tag_load_config()
                              {
                                  $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 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 getItems has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  public function getItems(\CriteriaElement $criteria = null): array
                                  {
                                      $ret = [];
                                      $sql = '    SELECT o.tl_id, o.tag_itemid, o.tag_modid, o.tag_catid, o.tag_time';
                                      $sql .= "    FROM {$this->table_link} AS o LEFT JOIN {$this->table} AS l ON l.{$this->keyName} = o.{$this->keyName}";
                              Severity: Minor
                              Found in class/TagHandler.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

                              Severity
                              Category
                              Status
                              Source
                              Language