XoopsModules25x/xoopspoll

View on GitHub

Showing 238 of 4,054 total issues

File jquery-ui-timepicker-addon.js has 1782 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*! jQuery Timepicker Addon - v1.6.3 - 2016-04-20
* http://trentrichardson.com/examples/timepicker
* Copyright (c) 2016 Trent Richardson; Licensed MIT */
(function (factory) {
    if (typeof define === 'function' && define.amd) {
Severity: Major
Found in assets/js/jquery-ui-timepicker-addon.js - About 4 days to fix

    File post.php has 888 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    //
    //  ------------------------------------------------------------------------ //
    //                XOOPS - PHP Content Management System                      //
    //                  Copyright (c) 2000-2016 XOOPS.org                        //
    Severity: Major
    Found in extras/newbb_4x/irmtfan/class/post.php - About 2 days to fix

      File post.php has 808 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/class/post.php - About 1 day to fix

        File Post.php has 777 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/class/Post.php - About 1 day to fix

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

          <?php
          /*------------------------------------------------------------------------
                          XOOPS - PHP Content Management System
                              Copyright (c) 2000-2016 XOOPS.org
                                 <http://xoops.org/>
          Severity: Major
          Found in extras/newbb_4x/irmtfan/viewtopic.php - About 1 day to fix

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

            <?php
            /*------------------------------------------------------------------------
                            XOOPS - PHP Content Management System
                                Copyright (c) 2000-2020 XOOPS.org
                                   <https://xoops.org>
            Severity: Major
            Found in extras/newbb_5x/irmtfan/viewtopic.php - About 1 day to fix

              Function _delete has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function _delete($post, $force = false)
                  {
                      if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                          return false;
                      }
              Severity: Minor
              Found in extras/newbb_5x/irmtfan/class/PostHandler.php - About 1 day 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 _delete has a Cognitive Complexity of 71 (exceeds 5 allowed). Consider refactoring.
              Open

                  private function _delete(&$post, $force = false)
                  {
                      if ((!$post instanceof Post) || (0 === $post->getVar('post_id'))) {
                          return false;
                      }
              Severity: Minor
              Found in extras/newbb_4x/irmtfan/class/post.php - About 1 day 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

              File main.php has 587 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              <?php
              /*
                             XOOPS - PHP Content Management System
                                 Copyright (c) 2000-2020 XOOPS.org
                                    <https://xoops.org>
              Severity: Major
              Found in admin/main.php - About 1 day to fix

                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

                    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

                      Function _delete has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function _delete(&$post, $force = false)
                          {
                              global $xoopsModule;
                      
                              if (!is_object($post) || $post->getVar('post_id') == 0) {
                      Severity: Minor
                      Found in extras/newbb_4x/trunk_4_00/class/post.php - About 1 day 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 _delete has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function _delete($post, $force = false)
                          {
                              global $xoopsModule;
                      
                              if (!is_object($post) || 0 == $post->getVar('post_id')) {
                      Severity: Minor
                      Found in extras/newbb_5x/trunk_5_00/class/Post.php - About 1 day 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 truncateHtml has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static function truncateHtml($text, $length = 100, $ending = '...', $exact = false, $considerHtml = true)
                          {
                              if ($considerHtml) {
                                  // if the plain text is shorter than the maximum length, return the whole text
                                  if (mb_strlen(\preg_replace('/<.*?' . '>/', '', $text)) <= $length) {
                      Severity: Minor
                      Found in class/Common/SysUtility.php - About 1 day 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

                      File Post.php has 506 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      <?php
                      
                      namespace XoopsModules\Newbb;
                      
                      /*
                      Severity: Major
                      Found in extras/newbb_5x/irmtfan/class/Post.php - About 1 day to fix

                        Method showPost has 203 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function showPost($isadmin)
                            {
                                global $myts;
                                global $forumUrl, $forumImage;
                                global $viewtopic_users, $viewtopic_posters, $forum_obj, $topic_obj, $online, $user_karma, $viewmode, $order, $start, $total_posts, $topic_status;
                        Severity: Major
                        Found in extras/newbb_4x/irmtfan/class/post.php - About 1 day to fix

                          File polls.php has 502 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/irmtfan/polls.php - About 1 day to fix

                            Method showPost has 201 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function showPost($isadmin)
                                {
                                    global $myts;
                                    global $forumUrl, $forumImage;
                                    global $viewtopic_users, $viewtopic_posters, $forum_obj, $topic_obj, $online, $user_karma, $viewmode, $order, $start, $total_posts, $topic_status;
                            Severity: Major
                            Found in extras/newbb_5x/irmtfan/class/Post.php - About 1 day to fix

                              File polls.php has 494 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: Minor
                              Found in extras/newbb_5x/irmtfan/polls.php - About 7 hrs to fix
                                Severity
                                Category
                                Status
                                Source
                                Language