XoopsModules25x/xoopspoll

View on GitHub

Showing 4,407 of 4,407 total issues

File viewtopic.php has 586 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * Newbb module
 *
 * You may not change or alter any portion of this comment or credits
Severity: Major
Found in extras/newbb_5x/trunk_5_00/viewtopic.php - About 1 day to fix

    File viewtopic.php has 584 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    /**
     * Newbb module
     *
     * You may not change or alter any portion of this comment or credits
    Severity: Major
    Found in extras/newbb_4x/trunk_4_00/viewtopic.php - About 1 day to fix

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          if ($mode === 'move') {
              echo '<tr><td class="bg3">' . _MD_MOVETOPICTO . '</td><td class="bg1">';
              $box = '<select name="newforum" size="1">';
      
              $categoryHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Category');
      Severity: Major
      Found in extras/newbb_4x/irmtfan/topicmanager.php and 1 other location - About 1 day to fix
      extras/newbb_4x/trunk_4_00/topicmanager.php on lines 183..211

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 286.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          if ('move' === $mode) {
              echo '<tr><td class="bg3">' . _MD_MOVETOPICTO . '</td><td class="bg1">';
              $box = '<select name="newforum" size="1">';
      
              $categoryHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Category');
      Severity: Major
      Found in extras/newbb_4x/trunk_4_00/topicmanager.php and 1 other location - About 1 day to fix
      extras/newbb_4x/irmtfan/topicmanager.php on lines 295..323

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 286.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 4 locations. Consider refactoring.
      Open

              foreach ($optionIdArray as $key => $oId) {
                  if (!empty($oId) && ($option_obj = $xpOptHandler->get($oId))) {
                      // existing option object so need to update it
                      $optionTextArray[$key] = trim($optionTextArray[$key]);
                      if ('' === $optionTextArray[$key]) {
      Severity: Major
      Found in extras/newbb_4x/trunk_4_00/polls.php and 3 other locations - About 1 day to fix
      extras/newbb_4x/irmtfan/polls.php on lines 441..474
      extras/newbb_5x/irmtfan/polls.php on lines 436..469
      extras/newbb_5x/trunk_5_00/polls.php on lines 178..211

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 285.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 4 locations. Consider refactoring.
      Open

                  foreach ($optionIdArray as $key => $oId) {
                      if (!empty($oId) && ($option_obj = $xpOptHandler->get($oId))) {
                          // existing option object so need to update it
                          $optionTextArray[$key] = trim($optionTextArray[$key]);
                          if ('' === $optionTextArray[$key]) {
      Severity: Major
      Found in extras/newbb_4x/irmtfan/polls.php and 3 other locations - About 1 day to fix
      extras/newbb_4x/trunk_4_00/polls.php on lines 182..215
      extras/newbb_5x/irmtfan/polls.php on lines 436..469
      extras/newbb_5x/trunk_5_00/polls.php on lines 178..211

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 285.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 4 locations. Consider refactoring.
      Open

              foreach ($optionIdArray as $key => $oId) {
                  if (!empty($oId) && ($option_obj = $xpOptHandler->get($oId))) {
                      // existing option object so need to update it
                      $optionTextArray[$key] = trim($optionTextArray[$key]);
                      if ('' === $optionTextArray[$key]) {
      Severity: Major
      Found in extras/newbb_5x/trunk_5_00/polls.php and 3 other locations - About 1 day to fix
      extras/newbb_4x/irmtfan/polls.php on lines 441..474
      extras/newbb_4x/trunk_4_00/polls.php on lines 182..215
      extras/newbb_5x/irmtfan/polls.php on lines 436..469

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 285.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 4 locations. Consider refactoring.
      Open

                  foreach ($optionIdArray as $key => $oId) {
                      if (!empty($oId) && ($option_obj = $xpOptHandler->get($oId))) {
                          // existing option object so need to update it
                          $optionTextArray[$key] = trim($optionTextArray[$key]);
                          if ('' === $optionTextArray[$key]) {
      Severity: Major
      Found in extras/newbb_5x/irmtfan/polls.php and 3 other locations - About 1 day to fix
      extras/newbb_4x/irmtfan/polls.php on lines 441..474
      extras/newbb_4x/trunk_4_00/polls.php on lines 182..215
      extras/newbb_5x/trunk_5_00/polls.php on lines 178..211

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 285.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

              if ($GLOBALS['xoopsModuleConfig']['enable_permcheck']) {
                  /** @var NewbbTopicHandler $topicHandler */
                  $topicHandler = \XoopsModules\Newbb\Helper::getInstance()->getHandler('Topic');
                  $topic_status  = $topic_obj->getVar('topic_status');
                  if ($topicHandler->getPermission($forum_id, $topic_status, 'edit')) {
      Severity: Major
      Found in extras/newbb_4x/irmtfan/class/post.php and 1 other location - About 1 day to fix
      extras/newbb_5x/irmtfan/class/Post.php on lines 536..585

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 279.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

              if ($GLOBALS['xoopsModuleConfig']['enable_permcheck']) {
                  /** @var Newbb\TopicHandler $topicHandler */
                  $topicHandler = Newbb\Helper::getInstance()->getHandler('Topic');
                  $topic_status = $topic_obj->getVar('topic_status');
                  if ($topicHandler->getPermission($forum_id, $topic_status, 'edit')) {
      Severity: Major
      Found in extras/newbb_5x/irmtfan/class/Post.php and 1 other location - About 1 day to fix
      extras/newbb_4x/irmtfan/class/post.php on lines 525..574

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 279.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          public static function setVoteCookie($index, $value, $expires = 0, $cookieBaseName = 'voted_polls')
          {
              $pollDir = \basename(\dirname(__DIR__));
              $success = false;
              // do a little sanity check on $index and $cookieBaseName
      Severity: Major
      Found in class/Utility.php and 1 other location - About 1 day to fix
      class/PollUtility.php on lines 141..173

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 273.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

          public static function setVoteCookie($index, $value, $expires = 0, $cookieBaseName = 'voted_polls')
          {
              $pollDir = \basename(\dirname(__DIR__));
              $success = false;
              // do a little sanity check on $index and $cookieBaseName
      Severity: Major
      Found in class/PollUtility.php and 1 other location - About 1 day to fix
      class/Utility.php on lines 114..146

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 273.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              $poll_vars = array(
                  'user_id'     => XoopsRequest::getInt('user_id', $GLOBALS['xoopsUser']->uid(), 'POST'),
                  'question'    => XoopsRequest::getString('question', null, 'POST'),
                  'description' => XoopsRequest::getText('description', null, 'POST'),
                  'mail_status' => (XoopspollConstants::NOTIFICATION_ENABLED === $notify) ? XoopspollConstants::POLL_NOT_MAILED : XoopspollConstants::POLL_MAILED,
      Severity: Major
      Found in extras/newbb_4x/trunk_4_00/polls.php and 4 other locations - About 1 day to fix
      admin/main.php on lines 247..261
      extras/newbb_4x/irmtfan/polls.php on lines 413..427
      extras/newbb_5x/irmtfan/polls.php on lines 408..422
      extras/newbb_5x/trunk_5_00/polls.php on lines 150..164

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 256.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                  $poll_vars = [
                      'user_id'     => Request::getInt('user_id', $GLOBALS['xoopsUser']->uid(), 'POST'),
                      'question'    => Request::getString('question', null, 'POST'),
                      'description' => Request::getText('description', null, 'POST'),
                      'mail_status' => (Constants::NOTIFICATION_ENABLED === $notify) ? Constants::POLL_NOT_MAILED : Constants::POLL_MAILED,
      Severity: Major
      Found in extras/newbb_5x/irmtfan/polls.php and 4 other locations - About 1 day to fix
      admin/main.php on lines 247..261
      extras/newbb_4x/irmtfan/polls.php on lines 413..427
      extras/newbb_4x/trunk_4_00/polls.php on lines 154..168
      extras/newbb_5x/trunk_5_00/polls.php on lines 150..164

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 256.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              $poll_vars = [
                  'user_id'     => Request::getInt('user_id', $GLOBALS['xoopsUser']->uid(), 'POST'),
                  'question'    => Request::getString('question', null, 'POST'),
                  'description' => Request::getText('description', null, 'POST'),
                  'mail_status' => (Constants::NOTIFICATION_ENABLED === $notify) ? Constants::POLL_NOT_MAILED : Constants::POLL_MAILED,
      Severity: Major
      Found in extras/newbb_5x/trunk_5_00/polls.php and 4 other locations - About 1 day to fix
      admin/main.php on lines 247..261
      extras/newbb_4x/irmtfan/polls.php on lines 413..427
      extras/newbb_4x/trunk_4_00/polls.php on lines 154..168
      extras/newbb_5x/irmtfan/polls.php on lines 408..422

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 256.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

              $pollVars = [
                  'user_id'     => Request::getInt('user_id', $GLOBALS['xoopsUser']->uid(), 'POST'),
                  'question'    => Request::getString('question', null, 'POST'),
                  'description' => Request::getText('description', null, 'POST'),
                  'mail_status' => (Constants::NOTIFICATION_ENABLED === $notify) ? Constants::POLL_NOT_MAILED : Constants::POLL_MAILED,
      Severity: Major
      Found in admin/main.php and 4 other locations - About 1 day to fix
      extras/newbb_4x/irmtfan/polls.php on lines 413..427
      extras/newbb_4x/trunk_4_00/polls.php on lines 154..168
      extras/newbb_5x/irmtfan/polls.php on lines 408..422
      extras/newbb_5x/trunk_5_00/polls.php on lines 150..164

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 256.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 5 locations. Consider refactoring.
      Open

                  $poll_vars = [
                      'user_id'     => XoopsRequest::getInt('user_id', $GLOBALS['xoopsUser']->uid(), 'POST'),
                      'question'    => XoopsRequest::getString('question', null, 'POST'),
                      'description' => XoopsRequest::getText('description', null, 'POST'),
                      'mail_status' => (XoopspollConstants::NOTIFICATION_ENABLED === $notify) ? XoopspollConstants::POLL_NOT_MAILED : XoopspollConstants::POLL_MAILED,
      Severity: Major
      Found in extras/newbb_4x/irmtfan/polls.php and 4 other locations - About 1 day to fix
      admin/main.php on lines 247..261
      extras/newbb_4x/trunk_4_00/polls.php on lines 154..168
      extras/newbb_5x/irmtfan/polls.php on lines 408..422
      extras/newbb_5x/trunk_5_00/polls.php on lines 150..164

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 256.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Method listBlocks has 211 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          function listBlocks()
          {
              global $xoopsModule, $pathIcon16;
              require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
              $moduleDirName = basename(dirname(__DIR__));
      Severity: Major
      Found in admin/blocksadmin.php - About 1 day to fix

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        if ('xoopspoll' === $pollmodules) {
            $pollObj = $xpPollHandler->get($poll_id);
            if ($pollObj instanceof Xoopspoll\Poll) {
                if ($pollObj->getVar('multiple')) {
                    $optionId = Request::getInt('option_id', 0, 'POST');
        Severity: Major
        Found in extras/newbb_5x/irmtfan/votepolls.php and 1 other location - About 1 day to fix
        extras/newbb_4x/irmtfan/votepolls.php on lines 73..156

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 254.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Identical blocks of code found in 2 locations. Consider refactoring.
        Open

        if ('xoopspoll' === $pollmodules) {
            $pollObj = $xpPollHandler->get($poll_id);
            if ($pollObj instanceof \XoopspollPoll) {
                if ($pollObj->getVar('multiple')) {
                    $optionId = XoopsRequest::getInt('option_id', 0, 'POST');
        Severity: Major
        Found in extras/newbb_4x/irmtfan/votepolls.php and 1 other location - About 1 day to fix
        extras/newbb_5x/irmtfan/votepolls.php on lines 68..150

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 254.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language