XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Function showAtElement has 82 lines of code (exceeds 25 allowed). Consider refactoring.
Open

Calendar.prototype.showAtElement = function (el, opts) {
    var self = this;
    var p = Calendar.getAbsolutePos(el);
    if (!opts || typeof opts != "string") {
        this.showAt(p.x, p.y + el.offsetHeight);
Severity: Major
Found in assets/js/jscalendar/calendar.js - About 3 hrs to fix

    Function Expander has 82 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        hs.Expander = function (a, params, custom, contentType) {
            if (document.readyState && hs.ie && !hs.isReady) {
                hs.addEventListener(document, 'ready', function () {
                    new hs.Expander(a, params, custom, contentType);
                });
    Severity: Major
    Found in assets/images/js/highslide/highslide-full.js - About 3 hrs to fix

      Method OutputThumbnail has 82 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function OutputThumbnail()
          {
              $this->purgeTempFiles();
      
              if (!$this->useRawIMoutput && !is_resource($this->gdimg_output)) {
      Severity: Major
      Found in thumbs/phpthumb.class.php - About 3 hrs to fix

        Function crossfade has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

                crossfade: function (up, to, from) {
                    if (!up) return;
                    var exp = this,
                        last = this.last,
                        x = this.x,
        Severity: Minor
        Found in assets/images/js/highslide/highslide-with-gallery.js - About 3 hrs 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 getTemplateContent has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

                public function getTemplateContent($name)
                {
                    $name  = strtoupper($name);
                    $index = $this->iteration[$name];
        
        
        Severity: Minor
        Found in include/patTemplate.php - About 3 hrs 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 get_coming_schedule has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

                public function get_coming_schedule($get_target = '', $num = 5)
                {
                    // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;
        
                    $ret = '';
        Severity: Minor
        Found in class/APCal.php - About 3 hrs 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 applyPathSegment has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

            public function applyPathSegment(&$segments, $segment)
            {
                if ($segment == '.') {
                    return; // always remove
                }
        Severity: Minor
        Found in thumbs/phpthumb.class.php - About 3 hrs 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 setOutputFormat has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
        Open

            public function setOutputFormat()
            {
                static $alreadyCalled = false;
                if ($this->thumbnailFormat && $alreadyCalled) {
                    return true;
        Severity: Minor
        Found in thumbs/phpthumb.class.php - About 3 hrs 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

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

                        if (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) {
                            var body = document.body;
        
                            function pixDimmerSize() {
                                hs.setStyles(hs.dimmer, {
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 3 hrs to fix
        assets/images/js/highslide/highslide-full.js on lines 525..537

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

        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 (/(Android|iPad|iPhone|iPod)/.test(navigator.userAgent)) {
                            var body = document.body;
        
                            function pixDimmerSize() {
                                hs.setStyles(hs.dimmer, {
        Severity: Major
        Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 3 hrs to fix
        assets/images/js/highslide/highslide-with-gallery.js on lines 382..394

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

        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 CalculateThumbnailDimensions has 81 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function CalculateThumbnailDimensions()
            {
                $this->DebugMessage('CalculateThumbnailDimensions() starting with [W,H,sx,sy,sw,sh] initially set to ['
                                    . $this->source_width
                                    . ','
        Severity: Major
        Found in thumbs/phpthumb.class.php - About 3 hrs to fix

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

              $cachetimes = array(
                  '0'       => _NOCACHE,
                  '30'      => sprintf(_SECONDS, 30),
                  '60'      => _MINUTE,
                  '300'     => sprintf(_MINUTES, 5),
          Severity: Major
          Found in admin/myblocksadmin.php and 1 other location - About 3 hrs to fix
          admin/myblocksadmin2.php on lines 95..107

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

          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

              $cachetimes = array(
                  '0'       => _NOCACHE,
                  '30'      => sprintf(_SECONDS, 30),
                  '60'      => _MINUTE,
                  '300'     => sprintf(_MINUTES, 5),
          Severity: Major
          Found in admin/myblocksadmin2.php and 1 other location - About 3 hrs to fix
          admin/myblocksadmin.php on lines 104..116

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

          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

          File categories.php has 299 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: Minor
          Found in admin/categories.php - About 3 hrs to fix

            Function Expander has 79 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                hs.Expander = function (a, params, custom, contentType) {
                    if (document.readyState && hs.ie && !hs.isReady) {
                        hs.addEventListener(document, 'ready', function () {
                            new hs.Expander(a, params, custom, contentType);
                        });
            Severity: Major
            Found in assets/images/js/highslide/highslide-with-gallery.js - About 3 hrs to fix

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

                          for (var i = 0; i < this.overlays.length; i++) {
                              var o = hs.$('hsId' + this.overlays[i]);
                              if (/panel$/.test(o.position)) this.positionOverlay(o);
                              else hs.push(os, o);
                          }
              Severity: Major
              Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 3 hrs to fix
              assets/images/js/highslide/highslide-full.js on lines 2829..2833
              assets/images/js/highslide/highslide-with-html.js on lines 2238..2242
              assets/images/js/highslide/highslide.js on lines 1727..1731

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

              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

                          for (var i = 0; i < this.overlays.length; i++) {
                              var o = hs.$('hsId' + this.overlays[i]);
                              if (/panel$/.test(o.position)) this.positionOverlay(o);
                              else hs.push(os, o);
                          }
              Severity: Major
              Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 3 hrs to fix
              assets/images/js/highslide/highslide-with-gallery.js on lines 2244..2248
              assets/images/js/highslide/highslide-with-html.js on lines 2238..2242
              assets/images/js/highslide/highslide.js on lines 1727..1731

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

              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

                          for (var i = 0; i < this.overlays.length; i++) {
                              var o = hs.$('hsId' + this.overlays[i]);
                              if (/panel$/.test(o.position)) this.positionOverlay(o);
                              else hs.push(os, o);
                          }
              Severity: Major
              Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 3 hrs to fix
              assets/images/js/highslide/highslide-full.js on lines 2829..2833
              assets/images/js/highslide/highslide-with-gallery.js on lines 2244..2248
              assets/images/js/highslide/highslide.js on lines 1727..1731

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

              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

                          for (var i = 0; i < this.overlays.length; i++) {
                              var o = hs.$('hsId' + this.overlays[i]);
                              if (/panel$/.test(o.position)) this.positionOverlay(o);
                              else hs.push(os, o);
                          }
              Severity: Major
              Found in assets/images/js/highslide/highslide.js and 3 other locations - About 3 hrs to fix
              assets/images/js/highslide/highslide-full.js on lines 2829..2833
              assets/images/js/highslide/highslide-with-gallery.js on lines 2244..2248
              assets/images/js/highslide/highslide-with-html.js on lines 2238..2242

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

              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

                      sleep: function () {
                          if (this.outline) this.outline.table.style.display = 'none';
                          this.releaseMask = null;
                          this.wrapper.style.display = 'none';
                          this.isExpanded = false;
              Severity: Major
              Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 3 hrs to fix
              assets/images/js/highslide/highslide-full.js on lines 2652..2658

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

              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