mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

File highslide-full.js has 3028 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Name:    Highslide JS
 * Version: 4.1.13 (2011-10-06)
 * Config:  default +events +unobtrusive +imagemap +slideshow +positioning +transitions +viewport +thumbstrip +inline +ajax +iframe +flash
 * Author:  Torstein Hønsi
Severity: Major
Found in assets/js/highslide-full.js - About 1 wk to fix

    File highslide-with-gallery.js has 2384 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Name:    Highslide JS
     * Version: 4.1.13 (2011-10-06)
     * Config:  default +slideshow +positioning +transitions +viewport +thumbstrip
     * Author:  Torstein Hønsi
    Severity: Major
    Found in assets/js/highslide-with-gallery.js - About 6 days to fix

      File pcltar.lib.php has 1780 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      // --------------------------------------------------------------------------------
      // PhpConcept Library - Tar Module 1.3.1
      // --------------------------------------------------------------------------------
      // License GNU/GPL - Vincent Blavet - January 2003
      Severity: Major
      Found in class/pcltar.lib.php - About 4 days to fix

        File EventHandler.php has 1695 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        <?php
        
        namespace XoopsModules\Extcal;
        
        /*
        Severity: Major
        Found in class/EventHandler.php - About 4 days to fix

          File highslide.js has 1660 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Name:    Highslide JS
           * Version: 4.1.13 (2011-10-06)
           * Config:  default
           * Author:  Torstein Hønsi
          Severity: Major
          Found in assets/js/highslide.js - About 4 days to fix

            Function PclTarHandleExtract has a Cognitive Complexity of 211 (exceeds 5 allowed). Consider refactoring.
            Open

                function PclTarHandleExtract(
                    $p_tarname,
                    $p_file_list,
                    &$p_list_detail,
                    $p_mode,
            Severity: Minor
            Found in class/pcltar.lib.php - About 4 days 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

            Consider simplifying this complex logical expression.
            Open

            if (!hs) {
                var hs = {
            // Language strings
                    lang: {
                        cssDirection: 'ltr',
            Severity: Critical
            Found in assets/js/highslide-full.js - About 2 days to fix

              Function PclTarHandleUpdate has a Cognitive Complexity of 130 (exceeds 5 allowed). Consider refactoring.
              Open

                  function PclTarHandleUpdate($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode, $p_add_dir, $p_remove_dir)
                  {
                      TrFctStart(__FILE__, __LINE__, 'PclTarHandleUpdate', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
                      $v_result     = 1;
                      $v_nb         = 0;
              Severity: Minor
              Found in class/pcltar.lib.php - About 2 days 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

              Consider simplifying this complex logical expression.
              Open

              if (!hs) {
                  var hs = {
              // Language strings
                      lang: {
                          cssDirection: 'ltr',
              Severity: Critical
              Found in assets/js/highslide-with-gallery.js - About 2 days to fix

                Method getOccurTS has 410 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getOccurTS($month, $year, $dayCode)
                    {
                        if (0 === mb_strpos($dayCode, 'MD')) {
                            if ('' != mb_substr($dayCode, 2)) {
                                return \mktime(0, 0, 0, $month, mb_substr($dayCode, 2), $year);
                Severity: Major
                Found in class/EventHandler.php - About 2 days to fix

                  File xoops_version.php has 810 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  /*
                   * You may not change or alter any portion of this comment or credits
                   * of supporting developers from this source code or any supporting source code
                   * which is considered copyrighted (c) material of the original comment or credit authors.
                  Severity: Major
                  Found in xoops_version.php - About 1 day to fix

                    Function PclTarMerge has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring.
                    Open

                        function PclTarMerge($p_tarname, $p_tarname_add, $p_mode = '', $p_mode_add = '')
                        {
                            TrFctStart(__FILE__, __LINE__, 'PclTarMerge', "tar='$p_tarname', tar_add='$p_tarname_add', mode='$p_mode', mode_add='$p_mode_add'");
                            $v_result = 1;
                    
                    
                    Severity: Minor
                    Found in class/pcltar.lib.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 Thumbstrip has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
                    Open

                        hs.Thumbstrip = function (slideshow) {
                            function add(exp) {
                                hs.extend(options || {}, {
                                    overlayId: dom,
                                    hsId: 'thumbstrip',
                    Severity: Minor
                    Found in assets/js/highslide-full.js - 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 Thumbstrip has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
                    Open

                        hs.Thumbstrip = function (slideshow) {
                            function add(exp) {
                                hs.extend(options || {}, {
                                    overlayId: dom,
                                    hsId: 'thumbstrip',
                    Severity: Minor
                    Found in assets/js/highslide-with-gallery.js - 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

                    Consider simplifying this complex logical expression.
                    Open

                    if (!hs) {
                        var hs = {
                    // Language strings
                            lang: {
                                cssDirection: 'ltr',
                    Severity: Critical
                    Found in assets/js/highslide.js - About 1 day to fix

                      Function PclTarHandleDelete has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring.
                      Open

                          function PclTarHandleDelete($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode)
                          {
                              TrFctStart(__FILE__, __LINE__, 'PclTarHandleDelete', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
                              $v_result = 1;
                              $v_nb     = 0;
                      Severity: Minor
                      Found in class/pcltar.lib.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 getOccurTS has a Cognitive Complexity of 82 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public function getOccurTS($month, $year, $dayCode)
                          {
                              if (0 === mb_strpos($dayCode, 'MD')) {
                                  if ('' != mb_substr($dayCode, 2)) {
                                      return \mktime(0, 0, 0, $month, mb_substr($dayCode, 2), $year);
                      Severity: Minor
                      Found in class/EventHandler.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

                      Method getEventForm has 326 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function getEventForm($siteSide = 'user', $mode = 'new', $data = null)
                          {
                              /** @var Helper $helper */
                              $helper          = Helper::getInstance();
                              $categoryHandler = $helper->getHandler(\_EXTCAL_CLN_CAT);
                      Severity: Major
                      Found in class/EventHandler.php - About 1 day to fix

                        Function PclTarHandleExtractFile has a Cognitive Complexity of 80 (exceeds 5 allowed). Consider refactoring.
                        Open

                            function PclTarHandleExtractFile($p_tar, &$v_header, $p_path, $p_remove_path, $p_tar_mode)
                            {
                                TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractFile', "archive_descr='$p_tar', path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
                                $v_result = 1;
                        
                        
                        Severity: Minor
                        Found in class/pcltar.lib.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 getEventForm has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function getEventForm($siteSide = 'user', $mode = 'new', $data = null)
                            {
                                /** @var Helper $helper */
                                $helper          = Helper::getInstance();
                                $categoryHandler = $helper->getHandler(\_EXTCAL_CLN_CAT);
                        Severity: Minor
                        Found in class/EventHandler.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

                        Severity
                        Category
                        Status
                        Source
                        Language