XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

Method get_coming_schedule has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public function get_coming_schedule($get_target = '', $num = 5)
        {
            // if( $get_target == '' ) $get_target = $_SERVER['SCRIPT_NAME'] ;

            $ret = '';
Severity: Major
Found in class/APCal.php - About 2 hrs to fix

    Method HistogramStretch has 64 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function HistogramStretch(&$gdimg, $band = '*', $method = 0, $threshold = 0.1)
        {
            // equivalent of "Auto Contrast" in Adobe Photoshop
            // method 0 stretches according to RGB colors. Gives a more conservative stretch.
            // method 1 band stretches according to grayscale which is color-biased (59% green, 30% red, 11% blue). May give a punchier / more aggressive stretch, possibly appearing over-saturated
    Severity: Major
    Found in thumbs/phpthumb.filters.php - About 2 hrs to fix

      Method RedirectToCachedFile has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function RedirectToCachedFile()
      {
          global $phpThumb;
      
          $nice_cachefile = str_replace(DIRECTORY_SEPARATOR, '/', $phpThumb->cache_filename);
      Severity: Major
      Found in thumbs/phpThumb.php - About 2 hrs to fix

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

            if (hs.ie && window == window.top) {
                (function () {
                    try {
                        document.documentElement.doScroll('left');
                    } catch (e) {
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 2 hrs to fix
        assets/images/js/highslide/highslide-full.js on lines 3339..3349
        assets/images/js/highslide/highslide-with-html.js on lines 2498..2508
        assets/images/js/highslide/highslide.js on lines 1870..1880

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

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

            if (hs.ie && window == window.top) {
                (function () {
                    try {
                        document.documentElement.doScroll('left');
                    } catch (e) {
        Severity: Major
        Found in assets/images/js/highslide/highslide.js and 3 other locations - About 2 hrs to fix
        assets/images/js/highslide/highslide-full.js on lines 3339..3349
        assets/images/js/highslide/highslide-with-gallery.js on lines 2633..2643
        assets/images/js/highslide/highslide-with-html.js on lines 2498..2508

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

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

            if (hs.ie && window == window.top) {
                (function () {
                    try {
                        document.documentElement.doScroll('left');
                    } catch (e) {
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 2 hrs to fix
        assets/images/js/highslide/highslide-full.js on lines 3339..3349
        assets/images/js/highslide/highslide-with-gallery.js on lines 2633..2643
        assets/images/js/highslide/highslide.js on lines 1870..1880

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

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

            if (hs.ie && window == window.top) {
                (function () {
                    try {
                        document.documentElement.doScroll('left');
                    } catch (e) {
        Severity: Major
        Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 2 hrs to fix
        assets/images/js/highslide/highslide-with-gallery.js on lines 2633..2643
        assets/images/js/highslide/highslide-with-html.js on lines 2498..2508
        assets/images/js/highslide/highslide.js on lines 1870..1880

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

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

                htmlCreate: function () {
                    if (!hs.fireEvent(this, 'onBeforeGetContent')) return;
        
                    this.content = hs.getCacheBinding(this.a);
                    if (!this.content)
        Severity: Major
        Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

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

                  removeEventListener: function (el, event, func) {
                      try {
                          el.removeEventListener(event, func, false);
                      } catch (e) {
                          try {
          Severity: Major
          Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-with-gallery.js on lines 693..703
          assets/images/js/highslide/highslide-with-html.js on lines 691..701
          assets/images/js/highslide/highslide.js on lines 529..539

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

          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

                  removeEventListener: function (el, event, func) {
                      try {
                          el.removeEventListener(event, func, false);
                      } catch (e) {
                          try {
          Severity: Major
          Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-full.js on lines 868..878
          assets/images/js/highslide/highslide-with-html.js on lines 691..701
          assets/images/js/highslide/highslide.js on lines 529..539

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

          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

                  removeEventListener: function (el, event, func) {
                      try {
                          el.removeEventListener(event, func, false);
                      } catch (e) {
                          try {
          Severity: Major
          Found in assets/images/js/highslide/highslide.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-full.js on lines 868..878
          assets/images/js/highslide/highslide-with-gallery.js on lines 693..703
          assets/images/js/highslide/highslide-with-html.js on lines 691..701

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

          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

                  removeEventListener: function (el, event, func) {
                      try {
                          el.removeEventListener(event, func, false);
                      } catch (e) {
                          try {
          Severity: Major
          Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 2 hrs to fix
          assets/images/js/highslide/highslide-full.js on lines 868..878
          assets/images/js/highslide/highslide-with-gallery.js on lines 693..703
          assets/images/js/highslide/highslide.js on lines 529..539

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

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

              public function MaxFileSize()
              {
                  if (phpthumb_functions::gd_version() < 2) {
                      $this->DebugMessage('Skipping MaxFileSize() because gd_version is "' . phpthumb_functions::gd_version() . '"', __FILE__, __LINE__);
          
          
          Severity: Major
          Found in thumbs/phpthumb.class.php - About 2 hrs to fix

            Function step has 61 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                            step: function (val, args) {
                                var pos = args.pos,
                                    invPos = 1 - pos;
                                var prop,
                                    size = {},
            Severity: Major
            Found in assets/images/js/highslide/highslide-with-gallery.js - About 2 hrs to fix

              Function step has 61 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                              step: function (val, args) {
                                  var pos = args.pos,
                                      invPos = 1 - pos;
                                  var prop,
                                      size = {},
              Severity: Major
              Found in assets/images/js/highslide/highslide-full.js - About 2 hrs to fix

                Method createParser has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public function createParser($fname)
                        {
                            //  Store filename of the first file that has to be opened
                            //  If basedir is set, prepend basedir
                            $pname = $this->basedir !== '' ? $this->basedir . '/' . $fname : $fname;
                Severity: Major
                Found in include/patTemplate.php - About 2 hrs to fix

                  Function htmlCreate has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          htmlCreate: function () {
                  
                              this.content = hs.getCacheBinding(this.a);
                              if (!this.content)
                                  this.content = hs.getNode(this.contentId);
                  Severity: Major
                  Found in assets/images/js/highslide/highslide-with-html.js - About 2 hrs to fix

                    Function step has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                            step: function (gotoEnd) {
                                var t = (new Date()).getTime();
                                if (gotoEnd || t >= this.options.duration + this.startTime) {
                                    this.now = this.end;
                                    this.pos = this.state = 1;
                    Severity: Minor
                    Found in assets/images/js/highslide/highslide-full.js - About 2 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 dayMouseDown has a Cognitive Complexity of 18 (exceeds 5 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 2 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 showYearsCombo has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
                    Open

                    Calendar.showYearsCombo = function (fwd) {
                        var cal = Calendar._C;
                        if (!cal) {
                            return false;
                        }
                    Severity: Minor
                    Found in assets/js/jscalendar/calendar.js - About 2 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

                    Severity
                    Category
                    Status
                    Source
                    Language