XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Function close has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        close: function () {
            if (this.isClosing || !this.isExpanded) return;
            if (this.transitions[1] == 'crossfade' && hs.upcoming) {
                hs.getExpander(hs.upcoming).cancelLoading();
                hs.upcoming = null;
Severity: Minor
Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

    Function writeExtendedContent has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            writeExtendedContent: function () {
                if (this.hasExtendedContent) return;
                var exp = this;
                this.body = hs.getElementByClass(this.innerContent, 'DIV', 'highslide-body');
                if (this.objectType == 'iframe') {
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

      Method _compareseq has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function _compareseq($xoff, $xlim, $yoff, $ylim)
          {
              /* Slide down the bottom initial diagonal. */
              while ($xoff < $xlim && $yoff < $ylim && $this->xv[$xoff] == $this->yv[$yoff]) {
                  ++$xoff;
      Severity: Minor
      Found in include/Text_Diff.php - About 1 hr to fix

        Method import_ics_via_fopen has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public function import_ics_via_fopen($uri, $force_http = true, $user_uri = '')
                {
                    $user_uri = empty($user_uri) ? '' : $uri;
                    // changing webcal://* to http://*
                    $uri = str_replace('webcal://', 'http://', $uri);
        Severity: Minor
        Found in class/APCal_xoops.php - About 1 hr to fix

          Method apcal_new_event_edit has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Method import_ics_via_fopen has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public function import_ics_via_fopen($uri, $force_http = true, $user_uri = '')
                    {
                        if (strlen($uri) < 5) {
                            return '-1:';
                        }
            Severity: Minor
            Found in class/APCal.php - About 1 hr to fix

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

                  if (Calendar.is_ie) {
                      posY = window.event.clientY + document.body.scrollTop;
                      posX = window.event.clientX + document.body.scrollLeft;
                  } else {
                      posX = ev.pageX;
              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 1575..1581

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

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

                  if (Calendar.is_ie) {
                      posY = window.event.clientY + document.body.scrollTop;
                      posX = window.event.clientX + document.body.scrollLeft;
                  } else {
                      posY = ev.clientY + window.scrollY;
              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 473..479

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

              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

              Method ImageCopyRespectAlpha has 9 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      &$dst_im,
                      &$src_im,
                      $dst_x,
                      $dst_y,
                      $src_x,
              Severity: Major
              Found in thumbs/phpthumb.functions.php - About 1 hr to fix

                Method HistogramOverlay has 9 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        &$gdimg,
                        $bands = '*',
                        $colors = '',
                        $width = 0.25,
                        $height = 0.25,
                Severity: Major
                Found in thumbs/phpthumb.filters.php - About 1 hr to fix

                  Function setSize has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          setSize: function (i) {
                              var exp = this.exp;
                              if (exp.isImage && (exp.useBox || hs.padToMinWidth)) {
                                  this.imgSize = i;
                                  this.size = Math.max(this.size, this.imgSize);
                  Severity: Minor
                  Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

                    Function dayMouseDown has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    Calendar.dayMouseDown = function (ev) {
                        var el = Calendar.getElement(ev);
                        if (el.disabled) {
                            return false;
                        }
                    Severity: Minor
                    Found in assets/js/jscalendar/calendar.js - About 1 hr to fix

                      Function initSlideshow has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              initSlideshow: function () {
                                  if (!this.last) {
                                      for (var i = 0; i < hs.slideshows.length; i++) {
                                          var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                                          if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
                      Severity: Minor
                      Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

                        Function initSlideshow has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                initSlideshow: function () {
                                    if (!this.last) {
                                        for (var i = 0; i < hs.slideshows.length; i++) {
                                            var ss = hs.slideshows[i], sg = ss.slideshowGroup;
                                            if (typeof sg == 'undefined' || sg === null || sg === this.slideshowGroup)
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

                          Method getParsedTemplate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public function getParsedTemplate($name = '')
                                  {
                                      $name = strtoupper($name);
                          
                                      //  if a name was given, parse only this template
                          Severity: Minor
                          Found in include/patTemplate.php - About 1 hr to fix

                            Method b_sitemap_APCal_base has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function b_sitemap_APCal_base($moduleDirName)
                                {
                                    global $xoopsConfig, $xoopsDB, $xoopsUser;
                                    $myts = MyTextSanitizer::getInstance();
                            
                            
                            Severity: Minor
                            Found in include/sitemap.plugin.php - About 1 hr to fix

                              Method delete_schedule has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      public function delete_schedule($whr_sql_append = '', $eval_after = null)
                                      {
                                          if (!empty($_POST['event_id'])) {
                                              $event_id = (int)$_POST['event_id'];
                              
                              
                              Severity: Minor
                              Found in class/APCal.php - About 1 hr to fix

                                Method RenderToFile has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function RenderToFile($filename)
                                    {
                                        if (preg_match('#^[a-z0-9]+://#i', $filename)) {
                                            $this->DebugMessage('RenderToFile() failed because $filename (' . $filename . ') is a URL', __FILE__, __LINE__);
                                
                                
                                Severity: Minor
                                Found in thumbs/phpthumb.class.php - About 1 hr to fix

                                  Method FixedAspectRatio has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function FixedAspectRatio()
                                      {
                                          // optional fixed-dimension images (regardless of aspect ratio)
                                  
                                          if (!$this->far) {
                                  Severity: Minor
                                  Found in thumbs/phpthumb.class.php - About 1 hr to fix

                                    Method ImageMagickSwitchAvailable has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function ImageMagickSwitchAvailable($switchname)
                                        {
                                            static $IMoptions = null;
                                            if (is_null($IMoptions)) {
                                                $IMoptions   = array();
                                    Severity: Minor
                                    Found in thumbs/phpthumb.class.php - About 1 hr to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language