XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

File phpthumb.functions.php has 985 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.functions.php - About 2 days to fix

    Function parse has a Cognitive Complexity of 116 (exceeds 5 allowed). Consider refactoring.
    Open

        public function parse($filename, $calendar_name)
        {
            $ifile = @fopen($filename, 'r');
            if ($ifile === false) {
                return "-1: File cannot open. filename: $filename";
    Severity: Minor
    Found in class/iCal_parser.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

    Function update_schedule has a Cognitive Complexity of 115 (exceeds 5 allowed). Consider refactoring.
    Open

            public function update_schedule($set_sql_append = '', $whr_sql_append = '', $notify_callback = null)
            {
                if ($_POST['summary'] === '') {
                    $_POST['summary'] = _APCAL_MB_NOSUBJECT;
                }
    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

    File iCal_parser.php has 939 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/iCal_parser.php - About 2 days to fix

      Method get_schedule_view_html has 442 lines of code (exceeds 25 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: Major
      Found in class/APCal.php - About 2 days to fix

        File xoops_version.php has 896 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 2 days to fix

          Method getid3_bmp has 435 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getid3_bmp(&$BMPdata, &$ThisFileInfo, $ExtractPalette = false, $ExtractData = false)
              {
          
                  // shortcuts
                  $ThisFileInfo['bmp']['header']['raw'] = array();
          Severity: Major
          Found in thumbs/phpthumb.bmp.php - About 2 days to fix

            Function CleanUpCacheDirectory has a Cognitive Complexity of 107 (exceeds 5 allowed). Consider refactoring.
            Open

                public function CleanUpCacheDirectory()
                {
                    $this->DebugMessage('CleanUpCacheDirectory() set to purge ('
                                        . (is_null($this->config_cache_maxage) ? 'NULL' : number_format($this->config_cache_maxage / 86400, 1))
                                        . ' days; '
            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

            File APCal_xoops.php has 883 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_xoops.php - About 2 days to fix

              Function get_schedule_edit_html has a Cognitive Complexity of 106 (exceeds 5 allowed). Consider refactoring.
              Open

                      public function get_schedule_edit_html()
                      {
                          $editable  = $this->editable;
                          $superedit = $this->superedit;
                          $deletable = $this->deletable;
              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 ApplyFilters has 423 lines of code (exceeds 25 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: Major
              Found in thumbs/phpthumb.class.php - About 2 days to fix

                File patTemplate.php has 856 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 include/patTemplate.php - About 2 days to fix

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

                  <?php
                  ///////////////////////////////////////////////////////////////////////////////////////////////////
                  // GIF Util - (C) 2003 Yamasoft (S/C)
                  // http://www.yamasoft.com
                  // All Rights Reserved
                  Severity: Major
                  Found in thumbs/phpthumb.gif.php - 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-html.js - About 2 days to fix

                      Method rrule_extract has 381 lines of code (exceeds 25 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: Major
                      Found in class/APCal.php - About 1 day to fix

                        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/images/js/highslide/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/images/js/highslide/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/images/js/highslide/highslide.js - About 1 day to fix

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

                              public function WatermarkText(
                                  &$gdimg,
                                  $text,
                                  $size,
                                  $alignment,
                          Severity: Minor
                          Found in thumbs/phpthumb.filters.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 dump has a Cognitive Complexity of 79 (exceeds 5 allowed). Consider refactoring.
                          Open

                                  public function dump()
                                  {
                                      echo "<style type=\"text/css\">\n";
                                      echo ".text      {font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000}\n";
                                      echo ".mid       {font-family: Verdana, Arial, sans-serif; font-size: 12px; color: #000000}\n";
                          Severity: Minor
                          Found in include/patTemplate.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