mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

prototype has 40 functions (exceeds 20 allowed). Consider refactoring.
Open

    hs.Expander.prototype = {
        error: function (e) {
            if (hs.debug) alert('Line ' + e.lineNumber + ': ' + e.message);
            else window.location.href = this.src;
        },
Severity: Minor
Found in assets/js/highslide-with-gallery.js - About 5 hrs to fix

    Method PclTarHandleDelete has 132 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        function PclTarHandleDelete($p_tarname, $p_file_list, &$p_list_detail, $p_tar_mode)
        {
            TrFctStart(__FILE__, __LINE__, 'PclTarHandleDelete', "archive='$p_tarname', list, tar_mode=$p_tar_mode");
            $v_result = 1;
            $v_nb     = 0;
    Severity: Major
    Found in class/pcltar.lib.php - About 5 hrs to fix

      Function crossfade has 128 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              crossfade: function (up, to, from) {
                  if (!up) return;
                  var exp = this,
                      last = this.last,
                      x = this.x,
      Severity: Major
      Found in assets/js/highslide-full.js - About 5 hrs to fix

        Function justify has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
        Open

                justify: function (p, moveOnly) {
                    var tgtArr, tgt = p.target, dim = p == this.x ? 'x' : 'y';
        
                    var hasMovedMin = false;
        
        
        Severity: Minor
        Found in assets/js/highslide.js - About 5 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 changeSize has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
        Open

                changeSize: function (up, to, dur) {
        
                    if (this.outline && !this.outlineWhileAnimating) {
                        if (up) this.outline.setPosition();
                        else this.outline.destroy();
        Severity: Minor
        Found in assets/js/highslide.js - About 5 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 3 locations. Consider refactoring.
        Open

                addEventListener: function (el, event, func) {
                    if (el == document && event == 'ready') {
                        hs.push(hs.onReady, func);
                    }
                    try {
        Severity: Major
        Found in assets/js/highslide-full.js and 2 other locations - About 5 hrs to fix
        assets/js/highslide-with-gallery.js on lines 677..691
        assets/js/highslide.js on lines 513..527

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

        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

                    switch (e.keyCode) {
                        case 70: // f
                            if (exp) exp.doFullExpand();
                            return true;
                        case 32: // Space
        Severity: Major
        Found in assets/js/highslide-with-gallery.js and 1 other location - About 5 hrs to fix
        assets/js/highslide-full.js on lines 610..631

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

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

                addEventListener: function (el, event, func) {
                    if (el == document && event == 'ready') {
                        hs.push(hs.onReady, func);
                    }
                    try {
        Severity: Major
        Found in assets/js/highslide.js and 2 other locations - About 5 hrs to fix
        assets/js/highslide-full.js on lines 852..866
        assets/js/highslide-with-gallery.js on lines 677..691

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

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

                addEventListener: function (el, event, func) {
                    if (el == document && event == 'ready') {
                        hs.push(hs.onReady, func);
                    }
                    try {
        Severity: Major
        Found in assets/js/highslide-with-gallery.js and 2 other locations - About 5 hrs to fix
        assets/js/highslide-full.js on lines 852..866
        assets/js/highslide.js on lines 513..527

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

        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

                    switch (e.keyCode) {
                        case 70: // f
                            if (exp) exp.doFullExpand();
                            return true;
                        case 32: // Space
        Severity: Major
        Found in assets/js/highslide-full.js and 1 other location - About 5 hrs to fix
        assets/js/highslide-with-gallery.js on lines 466..487

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

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

            function TrMessage($p_file, $p_line, $p_level, $p_message = '')
            {
                global $g_pcl_trace_level;
                global $g_pcl_trace_mode;
                global $g_pcl_trace_filename;
        Severity: Major
        Found in class/pcltrace.lib.php and 1 other location - About 5 hrs to fix
        class/pcltrace.lib.php on lines 287..313

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

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

            function TrFctMessage($p_file, $p_line, $p_level, $p_message = '')
            {
                global $g_pcl_trace_level;
                global $g_pcl_trace_mode;
                global $g_pcl_trace_filename;
        Severity: Major
        Found in class/pcltrace.lib.php and 1 other location - About 5 hrs to fix
        class/pcltrace.lib.php on lines 328..354

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

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

                crossfade: function (up, to, from) {
                    if (!up) return;
                    var exp = this,
                        last = this.last,
                        x = this.x,
        Severity: Major
        Found in assets/js/highslide-with-gallery.js - About 4 hrs to fix

          Function dragHandler has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
          Open

                  dragHandler: function (e) {
                      if (!hs.dragArgs) return true;
                      if (!e) e = window.event;
                      var a = hs.dragArgs, exp = a.exp;
                      if (exp.iframe) {
          Severity: Minor
          Found in assets/js/highslide-full.js - About 4 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 Thumbstrip has 122 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              hs.Thumbstrip = function (slideshow) {
                  function add(exp) {
                      hs.extend(options || {}, {
                          overlayId: dom,
                          hsId: 'thumbstrip',
          Severity: Major
          Found in assets/js/highslide-full.js - About 4 hrs to fix

            Function Thumbstrip has 122 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                hs.Thumbstrip = function (slideshow) {
                    function add(exp) {
                        hs.extend(options || {}, {
                            overlayId: dom,
                            hsId: 'thumbstrip',
            Severity: Major
            Found in assets/js/highslide-with-gallery.js - About 4 hrs to fix

              hs has 37 functions (exceeds 20 allowed). Consider refactoring.
              Open

                  var hs = {
              // Language strings
                      lang: {
                          cssDirection: 'ltr',
                          loadingText: 'Loading...',
              Severity: Minor
              Found in assets/js/highslide.js - About 4 hrs to fix

                Function loadImg has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static function loadImg($REQUEST, &$event_picture1, &$event_picture2)
                    {
                        ///////////////////////////////////////////////////////////////////////////////
                        $uploaddir_event = XOOPS_ROOT_PATH . '/uploads/extcal/';
                        $uploadurl_event = XOOPS_URL . '/uploads/extcal/';
                Severity: Minor
                Found in class/Utility.php - About 4 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

                Method PclTarHandleExtractFile has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    function PclTarHandleExtractFile($p_tar, &$v_header, $p_path, $p_remove_path, $p_tar_mode)
                    {
                        TrFctStart(__FILE__, __LINE__, 'PclTarHandleExtractFile', "archive_descr='$p_tar', path=$p_path, remove_path='$p_remove_path', tar_mode=$p_tar_mode");
                        $v_result = 1;
                
                
                Severity: Major
                Found in class/pcltar.lib.php - About 4 hrs to fix

                  Calendar has 36 functions (exceeds 20 allowed). Consider refactoring.
                  Open

                  class Calendar
                  {
                      /**
                       * Instance of class implementing calendar engine interface.
                       *
                  Severity: Minor
                  Found in class/pear/Calendar/Calendar.php - About 4 hrs to fix
                    Severity
                    Category
                    Status
                    Source
                    Language