mambax7/extcal

View on GitHub

Showing 691 of 1,163 total issues

Function dim has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

        dim: function (exp) {
            if (!hs.dimmer) {
                isNew = true;
                hs.dimmer = hs.createElement('div', {
                    className: 'highslide-dimming highslide-viewport-size',
Severity: Minor
Found in assets/js/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 htmlPrepareClose has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

        htmlPrepareClose: function () {
            if (hs.geckoMac) { // bad redraws
                if (!hs.mask) hs.mask = hs.createElement('div', null,
                    {position: 'absolute'}, hs.container);
                hs.setStyles(hs.mask, {
Severity: Minor
Found in assets/js/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 PclTarCreate has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTarCreate($p_tarname, $p_filelist = '', $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
    {
        TrFctStart(__FILE__, __LINE__, 'PclTarCreate', "tar=$p_tarname, file='$p_filelist', mode=$p_mode, add_dir='$p_add_dir', remove_dir='$p_remove_dir'");
        $v_result = 1;

Severity: Minor
Found in class/pcltar.lib.php - 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 PclTraceAction has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

    function PclTraceAction($p_entry)
    {
        global $g_pcl_trace_level;
        global $g_pcl_trace_mode;
        global $g_pcl_trace_filename;
Severity: Minor
Found in class/pcltrace.lib.php - 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 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/js/highslide.js - About 1 hr to fix

    Method checkVerModule has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function checkVerModule($helper, $source = 'github', $default = 'master')
        {
            $moduleDirName      = \basename(\dirname(__DIR__, 2));
            $moduleDirNameUpper = mb_strtoupper($moduleDirName);
            $update             = '';
    Severity: Minor
    Found in class/Common/VersionChecks.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: Critical
      Found in assets/js/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/js/highslide-full.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/js/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/js/highslide-with-gallery.js - About 1 hr to fix

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

              function bExtcalUpcomingShow($options)
              {
                  /** @var Helper $helper */
                  if (!class_exists(Helper::class)) {
                      return false;
              Severity: Minor
              Found in blocks/upcoming.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/js/highslide.js - About 1 hr to fix

                  Method __construct has 13 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          $caption,
                          $name,
                          $value = 0,
                          $min = 0,
                          $max = 100,
                  Severity: Major
                  Found in class/Form/Spin/FormSpin.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/js/highslide-full.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/js/highslide-with-gallery.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/js/highslide-with-gallery.js - About 1 hr to fix

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

                          function ControlVersion() {
                              var version;
                              var axo;
                              var e;
                          
                          
                          Severity: Minor
                          Found in assets/js/AC_RunActiveContent.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/js/highslide.js - About 1 hr to fix

                              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/js/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/js/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

                              Severity
                              Category
                              Status
                              Source
                              Language