XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

File APCal.php has 4439 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 class/APCal.php - About 1 wk to fix

    File phpthumb.class.php has 4066 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    //////////////////////////////////////////////////////////////
    //   phpThumb() by James Heinrich <info@silisoftware.com>   //
    //        available at http://phpthumb.sourceforge.net      //
    //         and/or https://github.com/JamesHeinrich/phpThumb //
    Severity: Major
    Found in thumbs/phpthumb.class.php - About 1 wk to fix

      Function ImageMagickThumbnailToGD has a Cognitive Complexity of 537 (exceeds 5 allowed). Consider refactoring.
      Open

          public function ImageMagickThumbnailToGD()
          {
              // http://www.imagemagick.org/script/command-line-options.php
      
              $this->useRawIMoutput = true;
      Severity: Minor
      Found in thumbs/phpthumb.class.php - About 1 wk 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 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/images/js/highslide/highslide-full.js - About 1 wk to fix

        Function rrule_extract has a Cognitive Complexity of 345 (exceeds 5 allowed). Consider refactoring.
        Open

                public function rrule_extract($event_id)
                {
                    $yrs = $GLOBALS['xoopsDB']->query("SELECT *,TO_DAYS(end_date)-TO_DAYS(start_date) AS date_diff FROM $this->table WHERE id='$event_id'");
                    if ($GLOBALS['xoopsDB']->getRowsNum($yrs) < 1) {
                        return;
        Severity: Minor
        Found in class/APCal.php - About 1 wk 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 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/images/js/highslide/highslide-with-gallery.js - About 6 days to fix

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

          /**
           * Name:    Highslide JS
           * Version: 4.1.13 (2011-10-06)
           * Config:  default +inline +ajax +iframe +flash
           * Author:  Torstein Hønsi
          Severity: Major
          Found in assets/images/js/highslide/highslide-with-html.js - About 6 days to fix

            Function ApplyFilters has a Cognitive Complexity of 239 (exceeds 5 allowed). Consider refactoring.
            Open

                public function ApplyFilters()
                {
                    if ($this->fltr && is_array($this->fltr)) {
                        if (!require_once __DIR__ . '/phpthumb.filters.php') {
                            $this->DebugMessage('Error including "' . __DIR__ . '/phpthumb.filters.php" which is required for applying filters (' . implode(';', $this->fltr) . ')', __FILE__, __LINE__);
            Severity: Minor
            Found in thumbs/phpthumb.class.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

            File ro_regonlinehandler.php has 1735 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            <?php
            
            use Xmf\Request;
            
            require_once __DIR__ . '/../../mainfile.php';
            Severity: Major
            Found in ro_regonlinehandler.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/images/js/highslide/highslide.js - About 4 days to fix

                File calendar.js has 1567 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /*  Copyright Mihai Bazon, 2002-2005  |  www.bazon.net/mishoo
                 * -----------------------------------------------------------
                 *
                 * The DHTML Calendar, version 1.0 "It is happening again"
                 *
                Severity: Major
                Found in assets/js/jscalendar/calendar.js - About 4 days to fix

                  Function getid3_bmp has a Cognitive Complexity of 174 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function getid3_bmp(&$BMPdata, &$ThisFileInfo, $ExtractPalette = false, $ExtractData = false)
                      {
                  
                          // shortcuts
                          $ThisFileInfo['bmp']['header']['raw'] = array();
                  Severity: Minor
                  Found in thumbs/phpthumb.bmp.php - About 3 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

                  File phpthumb.filters.php has 1327 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  //////////////////////////////////////////////////////////////
                  //   phpThumb() by James Heinrich <info@silisoftware.com>   //
                  //        available at http://phpthumb.sourceforge.net      //
                  //         and/or https://github.com/JamesHeinrich/phpThumb //
                  Severity: Major
                  Found in thumbs/phpthumb.filters.php - About 3 days to fix

                    Method ImageMagickThumbnailToGD has 669 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function ImageMagickThumbnailToGD()
                        {
                            // http://www.imagemagick.org/script/command-line-options.php
                    
                            $this->useRawIMoutput = true;
                    Severity: Major
                    Found in thumbs/phpthumb.class.php - About 3 days to fix

                      Function get_weekly_html has a Cognitive Complexity of 155 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public function get_weekly_html($get_target = '')
                              {
                                  $roimage = XOOPS_URL . '/modules/apcal/assets/images/regonline/regonline.png'; // added by goffy: image for online registration
                                  $ret     = "
                           <table border='0' cellspacing='0' cellpadding='0' width='100%' style='border-collapse:collapse;margin:0px;'>
                      Severity: Minor
                      Found in class/APCal.php - About 3 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

                      Function get_schedule_view_html has a Cognitive Complexity of 147 (exceeds 5 allowed). Consider refactoring.
                      Open

                              public function get_schedule_view_html($for_print = false)
                              {
                                  global $xoopsTpl;
                      
                                  $smode     = empty($_GET['smode']) ? 'Monthly' : preg_replace('/[^a-zA-Z0-9_-]/', '', $_GET['smode']);
                      Severity: Minor
                      Found in class/APCal.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

                      Method get_schedule_edit_html has 581 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              public function get_schedule_edit_html()
                              {
                                  $editable  = $this->editable;
                                  $superedit = $this->superedit;
                                  $deletable = $this->deletable;
                      Severity: Major
                      Found in class/APCal.php - About 2 days to fix

                        Function SourceImageToGD has a Cognitive Complexity of 138 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public function SourceImageToGD()
                            {
                                if (is_resource($this->gdimg_source)) {
                                    $this->source_width  = imagesx($this->gdimg_source);
                                    $this->source_height = imagesy($this->gdimg_source);
                        Severity: Minor
                        Found in thumbs/phpthumb.class.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/images/js/highslide/highslide-full.js - About 2 days to fix

                          Consider simplifying this complex logical expression.
                          Open

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