XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Method ImageMagickVersion has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function ImageMagickVersion($returnRAW = false)
    {
        static $versionstring = null;
        if (is_null($versionstring)) {
            $versionstring = array(0 => false, 1 => false);
Severity: Minor
Found in thumbs/phpthumb.class.php - About 1 hr to fix

    Method GetAllFilesInSubfolders has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function GetAllFilesInSubfolders($dirname)
        {
            $AllFiles = array();
            $dirname  = rtrim(realpath($dirname), '/\\');
            if ($dirhandle = @opendir($dirname)) {
    Severity: Minor
    Found in thumbs/phpthumb.functions.php - About 1 hr to fix

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

              foreach ($cal->long_event_legends as $bit => $legend) {
                  $tmpl->addVar('LongEventLegends', 'BIT_MASK', 1 << ($bit - 1));
                  $tmpl->addVar('LongEventLegends', 'LEGEND_ALT', _APCAL_MB_ALLDAY_EVENT . " $bit");
                  $tmpl->addVar('LongEventLegends', 'LEGEND', $legend);
                  $tmpl->addVar('LongEventLegends', 'SKINPATH', $cal->images_url);
      Severity: Major
      Found in blocks/apcal_monthly_calendar.php and 1 other location - About 1 hr to fix
      class/APCal.php on lines 1180..1186

      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 102.

      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 2 locations. Consider refactoring.
      Open

                  foreach ($this->long_event_legends as $bit => $legend) {
                      $tmpl->addVar('LongEventLegends', 'BIT_MASK', 1 << ($bit - 1));
                      $tmpl->addVar('LongEventLegends', 'LEGEND_ALT', _APCAL_MB_ALLDAY_EVENT . " $bit");
                      $tmpl->addVar('LongEventLegends', 'LEGEND', $legend);
                      $tmpl->addVar('LongEventLegends', 'SKINPATH', $this->images_url);
      Severity: Major
      Found in class/APCal.php and 1 other location - About 1 hr to fix
      blocks/apcal_monthly_calendar.php on lines 87..93

      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 102.

      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 2 locations. Consider refactoring.
      Open

                      function nextMonth() {
                          var date = new Date(cal.date);
                          date.setDate(date.getDate() + step);
                          cal.setDate(date);
                      };
      Severity: Major
      Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
      assets/js/jscalendar/calendar.js on lines 1011..1015

      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 56.

      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 2 locations. Consider refactoring.
      Open

                      function prevMonth() {
                          var date = new Date(cal.date);
                          date.setDate(date.getDate() - step);
                          cal.setDate(date);
                      };
      Severity: Major
      Found in assets/js/jscalendar/calendar.js and 1 other location - About 1 hr to fix
      assets/js/jscalendar/calendar.js on lines 1016..1020

      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 56.

      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

      Function focus has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              focus: function () {
                  this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                  // blur others
                  for (var i = 0; i < hs.expanders.length; i++) {
                      if (hs.expanders[i] && i == hs.focusKey) {
      Severity: Minor
      Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

        Method get_vtimezones_str has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function get_vtimezones_str($timezones)
                {
                    if (empty($timezones)) {
                        return "BEGIN:VTIMEZONE\r
        TZID:GMT\r
        Severity: Minor
        Found in class/APCal.php - About 1 hr to fix

          Method apcal_thedays_schedule_edit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function apcal_thedays_schedule_edit($options)
              {
                  global $xoopsDB, $xoopsConfig;
          
                  $moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
          Severity: Minor
          Found in blocks/apcal_thedays_schedule.php - About 1 hr to fix

            Method load has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function load($lpData, &$hdrLen)
                {
                    $hdrLen = 0;
            
                    $this->m_lpVer = substr($lpData, 0, 6);
            Severity: Minor
            Found in thumbs/phpthumb.gif.php - About 1 hr to fix

              Method apcal_todays_schedule_edit has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function apcal_todays_schedule_edit($options)
                  {
                      global $xoopsDB, $xoopsConfig;
              
                      $moduleDirName = empty($options[0]) ? basename(dirname(__DIR__)) : $options[0];
              Severity: Minor
              Found in blocks/apcal_todays_schedule.php - About 1 hr to fix

                Method Frame has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function Frame(&$gdimg, $frame_width, $edge_width, $hexcolor_frame, $hexcolor1, $hexcolor2)
                    {
                        $frame_width    = ($frame_width ?: 5);
                        $edge_width     = ($edge_width ?: 1);
                        $hexcolor_frame = ($hexcolor_frame ?: 'CCCCCC');
                Severity: Minor
                Found in thumbs/phpthumb.filters.php - About 1 hr to fix

                  Consider simplifying this complex logical expression.
                  Open

                              if (!hs.container) {
                  
                                  hs.ieLt7 = hs.ie && hs.uaVersion < 7;
                                  hs.ieLt9 = hs.ie && hs.uaVersion < 9;
                  
                  
                  Severity: Major
                  Found in assets/images/js/highslide/highslide.js - About 1 hr to fix

                    Method get_todays_time_description has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                                $start,
                                $end,
                                $ynj,
                                $justify = true,
                                $admission = true,
                    Severity: Major
                    Found in class/APCal.php - About 1 hr to fix

                      Consider simplifying this complex logical expression.
                      Open

                      if ((!isset($_GET['action']) || $_GET['action'] === '') && isset($_GET['cid']) && !is_numeric($_GET['cid'])) {
                          $cat_title = addslashes($_GET['cid']);
                          $cat       = $GLOBALS['xoopsDB']->queryF("SELECT cid FROM {$GLOBALS['xoopsDB']->prefix('apcal_cat')} WHERE cat_shorttitle LIKE '$cat_title' LIMIT 0,1");
                      
                          if ($cat && $GLOBALS['xoopsDB']->getRowsNum($cat)) {
                      Severity: Major
                      Found in index.php - About 1 hr to fix

                        Consider simplifying this complex logical expression.
                        Open

                                                    if ($this->iar && ((int)$this->w > 0) && ((int)$this->h > 0)) {
                                                        list($nw, $nh) = phpthumb_functions::TranslateWHbyAngle($this->w, $this->h, $this->ra);
                                                        $nw          = ((round($nw) != 0) ? round($nw) : '');
                                                        $nh          = ((round($nh) != 0) ? round($nh) : '');
                                                        $commandline .= ' -' . $IMresizeParameter . ' ' . phpthumb_functions::escapeshellarg_replacement($nw . 'x' . $nh . '!');
                        Severity: Major
                        Found in thumbs/phpthumb.class.php - About 1 hr to fix

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

                                  previousOrNext: function (el, op) {
                                      var exp = hs.getExpander(el);
                                      if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
                                      else return false;
                                  },
                          Severity: Major
                          Found in assets/images/js/highslide/highslide.js and 3 other locations - About 1 hr to fix
                          assets/images/js/highslide/highslide-full.js on lines 588..592
                          assets/images/js/highslide/highslide-with-gallery.js on lines 445..449
                          assets/images/js/highslide/highslide-with-html.js on lines 440..444

                          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 55.

                          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

                                  previousOrNext: function (el, op) {
                                      var exp = hs.getExpander(el);
                                      if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
                                      else return false;
                                  },
                          Severity: Major
                          Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 1 hr to fix
                          assets/images/js/highslide/highslide-with-gallery.js on lines 445..449
                          assets/images/js/highslide/highslide-with-html.js on lines 440..444
                          assets/images/js/highslide/highslide.js on lines 301..305

                          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 55.

                          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

                                  previousOrNext: function (el, op) {
                                      var exp = hs.getExpander(el);
                                      if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
                                      else return false;
                                  },
                          Severity: Major
                          Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 1 hr to fix
                          assets/images/js/highslide/highslide-full.js on lines 588..592
                          assets/images/js/highslide/highslide-with-html.js on lines 440..444
                          assets/images/js/highslide/highslide.js on lines 301..305

                          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 55.

                          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

                                  previousOrNext: function (el, op) {
                                      var exp = hs.getExpander(el);
                                      if (exp) return hs.transit(exp.getAdjacentAnchor(op), exp);
                                      else return false;
                                  },
                          Severity: Major
                          Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 1 hr to fix
                          assets/images/js/highslide/highslide-full.js on lines 588..592
                          assets/images/js/highslide/highslide-with-gallery.js on lines 445..449
                          assets/images/js/highslide/highslide.js on lines 301..305

                          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 55.

                          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