XoopsModules25x/apcal

View on GitHub

Showing 1,049 of 26,336 total issues

Function contentLoaded has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        contentLoaded: function () {
            try {
                if (!this.content) return;
                this.content.onload = null;
                if (this.onLoadStarted) return;
Severity: Minor
Found in assets/images/js/highslide/highslide.js - 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: Critical
    Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

                      if (($event_uid == $current_uid && $current_uid > 0) || //current user is event owner
                          ($submitter == $current_uid && $current_uid > 0) || //current user made registration
                          ($cal->isadmin == 1) || //current user is admin
                          ($cal->superedit == 1) || //current user can edit/delete registrations of other persons
                          ($submitter == $current_uid && $current_uid == 0 && $poster_ip == $current_ip)) //current user is guest, but ip is the same as guest who made registration 
      Severity: Critical
      Found in ro_regonlinehandler.php - About 1 hr to fix

        Function correctRatio has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                correctRatio: function (ratio) {
                    var x = this.x,
                        y = this.y,
                        changed = false,
                        xSize = Math.min(x.full, x.size),
        Severity: Minor
        Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

          Function correctRatio has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  correctRatio: function (ratio) {
                      var x = this.x,
                          y = this.y,
                          changed = false,
                          xSize = Math.min(x.full, x.size),
          Severity: Minor
          Found in assets/images/js/highslide/highslide.js - About 1 hr to fix

            Function correctRatio has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    correctRatio: function (ratio) {
                        var x = this.x,
                            y = this.y,
                            changed = false,
                            xSize = Math.min(x.full, x.size),
            Severity: Minor
            Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

              Function createOverlay has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      createOverlay: function (o) {
                          var el = o.overlayId,
                              relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
                          if (typeof el == 'string') el = hs.getNode(el);
                          if (o.html) el = hs.createElement('div', {innerHTML: o.html});
              Severity: Minor
              Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

                Function correctRatio has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        correctRatio: function (ratio) {
                            var x = this.x,
                                y = this.y,
                                changed = false,
                                xSize = Math.min(x.full, x.size),
                Severity: Minor
                Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

                  Method get_tz_options has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public function get_tz_options($selected = 0)
                          {
                              $tzs = array(
                                  '-12',
                                  '-11',
                  Severity: Minor
                  Found in class/APCal.php - About 1 hr to fix

                    Method apcal_monthly_calendar_show has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function apcal_monthly_calendar_show($options)
                        {
                            global $xoopsConfig, $xoopsDB;
                    
                    
                    
                    Severity: Minor
                    Found in blocks/apcal_monthly_calendar.php - About 1 hr to fix

                      Function showHideElements has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              showHideElements: function (tagName, visibility) {
                                  var els = document.getElementsByTagName(tagName);
                                  var prop = tagName == '*' ? 'overflow' : 'visibility';
                                  for (var i = 0; i < els.length; i++) {
                                      if (prop == 'visibility' || (document.defaultView.getComputedStyle(
                      Severity: Minor
                      Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

                        Function createOverlay has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                createOverlay: function (o) {
                                    var el = o.overlayId,
                                        relToVP = (o.relativeTo == 'viewport' && !/panel$/.test(o.position));
                                    if (typeof el == 'string') el = hs.getNode(el);
                                    if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                        Severity: Minor
                        Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr to fix

                          Function keyHandler has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  keyHandler: function (e) {
                                      if (!e) e = window.event;
                                      if (!e.target) e.target = e.srcElement; // ie
                                      if (typeof e.target.form != 'undefined') return true; // form element has focus
                                      var exp = hs.getExpander();
                          Severity: Minor
                          Found in assets/images/js/highslide/highslide.js - About 1 hr to fix

                            Function showHideElements has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    showHideElements: function (tagName, visibility) {
                                        var els = document.getElementsByTagName(tagName);
                                        var prop = tagName == '*' ? 'overflow' : 'visibility';
                                        for (var i = 0; i < els.length; i++) {
                                            if (prop == 'visibility' || (document.defaultView.getComputedStyle(
                            Severity: Minor
                            Found in assets/images/js/highslide/highslide-full.js - About 1 hr to fix

                              Function keyHandler has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      keyHandler: function (e) {
                                          if (!e) e = window.event;
                                          if (!e.target) e.target = e.srcElement; // ie
                                          if (typeof e.target.form != 'undefined') return true; // form element has focus
                                          var exp = hs.getExpander();
                              Severity: Minor
                              Found in assets/images/js/highslide/highslide-with-html.js - About 1 hr to fix

                                Function get has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        get: function (key) {
                                            switch (key) {
                                                case 'loadingPos':
                                                    return this.tpos + this.tb + (this.t - hs.loading['offset' + this.ucwh]) / 2;
                                                case 'loadingPosXfade':
                                Severity: Minor
                                Found in assets/images/js/highslide/highslide-full.js - About 1 hr 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 getImageMapAreaCorrection has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        getImageMapAreaCorrection: function (area) {
                                            var c = area.coords.split(',');
                                            for (var i = 0; i < c.length; i++) c[i] = parseInt(c[i]);
                                
                                            if (area.shape.toLowerCase() == 'circle') {
                                Severity: Minor
                                Found in assets/images/js/highslide/highslide-full.js - About 1 hr 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 Outline has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    hs.Outline = function (outlineType, onLoad) {
                                        this.onLoad = onLoad;
                                        this.outlineType = outlineType;
                                        var v = hs.uaVersion, tr;
                                
                                
                                Severity: Minor
                                Found in assets/images/js/highslide/highslide-full.js - About 1 hr 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 css has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        css: function (el, prop) {
                                            if (el.style[prop]) {
                                                return el.style[prop];
                                            } else if (document.defaultView) {
                                                return document.defaultView.getComputedStyle(el, null).getPropertyValue(prop);
                                Severity: Minor
                                Found in assets/images/js/highslide/highslide-full.js - About 1 hr 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 destroyOverlays has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                                Open

                                        destroyOverlays: function () {
                                            if (!this.overlays.length) return;
                                            if (this.slideshow) {
                                                var c = this.slideshow.controls;
                                                if (c && hs.getExpander(c) == this) c.parentNode.removeChild(c);
                                Severity: Minor
                                Found in assets/images/js/highslide/highslide-with-gallery.js - About 1 hr 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