mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

Method insert has 67 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function insert(\XoopsObject $obj, $force = false, $checkObject = true)
    {
        if (false !== $checkObject) {
            if (!\is_object($obj)) {
                //                var_dump($obj);
Severity: Major
Found in class/ExtcalPersistableObjectHandler.php - About 2 hrs to fix

    Calendar_Engine_UnixTS has 24 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Calendar_Engine_UnixTS /* implements Calendar_Engine_Interface */
    {
        /**
         * Makes sure a given timestamp is only ever parsed once
         * <pre>
    Severity: Minor
    Found in class/pear/Calendar/Engine/UnixTS.php - About 2 hrs to fix

      Calendar_Engine_Interface has 24 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class Calendar_Engine_Interface
      {
          /**
           * Provides a mechansim to make sure parsing of timestamps
           * into human dates is only performed once per timestamp.
      Severity: Minor
      Found in class/pear/Calendar/Engine/Interface.php - About 2 hrs to fix

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

                        hs.loading = hs.createElement('a', {
                                className: 'highslide-loading',
                                title: hs.lang.loadingTitle,
                                innerHTML: hs.lang.loadingText,
                                href: 'javascript:;'
        Severity: Major
        Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
        assets/js/highslide-with-gallery.js on lines 762..773
        assets/js/highslide.js on lines 598..609

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

        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

                        hs.loading = hs.createElement('a', {
                                className: 'highslide-loading',
                                title: hs.lang.loadingTitle,
                                innerHTML: hs.lang.loadingText,
                                href: 'javascript:;'
        Severity: Major
        Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
        assets/js/highslide-full.js on lines 938..949
        assets/js/highslide-with-gallery.js on lines 762..773

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

        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

                        hs.loading = hs.createElement('a', {
                                className: 'highslide-loading',
                                title: hs.lang.loadingTitle,
                                innerHTML: hs.lang.loadingText,
                                href: 'javascript:;'
        Severity: Major
        Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
        assets/js/highslide-full.js on lines 938..949
        assets/js/highslide.js on lines 598..609

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

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

                positionOverlay: function (overlay) {
                    var p = overlay.position || 'middle center',
                        relToVP = (overlay.relativeTo == 'viewport'),
                        offX = overlay.offsetX,
                        offY = overlay.offsetY;
        Severity: Major
        Found in assets/js/highslide-full.js - About 2 hrs to fix

          Function contentLoaded has 66 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: Major
          Found in assets/js/highslide-full.js - About 2 hrs to fix

            Function positionOverlay has 66 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    positionOverlay: function (overlay) {
                        var p = overlay.position || 'middle center',
                            relToVP = (overlay.relativeTo == 'viewport'),
                            offX = overlay.offsetX,
                            offY = overlay.offsetY;
            Severity: Major
            Found in assets/js/highslide-with-gallery.js - About 2 hrs to fix

              Method PclTarHandleReadHeader has 65 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function PclTarHandleReadHeader($v_binary_data, &$v_header)
                  {
                      TrFctStart(__FILE__, __LINE__, 'PclTarHandleReadHeader', '');
                      $v_result = 1;
              
              
              Severity: Major
              Found in class/pcltar.lib.php - About 2 hrs to fix

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

                        for (var i = 0; i < hs.overrides.length; i++) {
                            var name = hs.overrides[i];
                            this[name] = params && typeof params[name] != 'undefined' ?
                                params[name] : hs[name];
                        }
                Severity: Major
                Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
                assets/js/highslide-with-gallery.js on lines 1186..1190
                assets/js/highslide.js on lines 999..1003

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

                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

                            var after = up ?
                                function () {
                
                                    if (exp.outline) exp.outline.table.style.visibility = "visible";
                                    setTimeout(function () {
                Severity: Major
                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
                assets/js/highslide-full.js on lines 2048..2058
                assets/js/highslide.js on lines 1330..1340

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

                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

                            var after = up ?
                                function () {
                
                                    if (exp.outline) exp.outline.table.style.visibility = "visible";
                                    setTimeout(function () {
                Severity: Major
                Found in assets/js/highslide-full.js and 2 other locations - About 2 hrs to fix
                assets/js/highslide-with-gallery.js on lines 1578..1588
                assets/js/highslide.js on lines 1330..1340

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

                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

                        for (var i = 0; i < hs.overrides.length; i++) {
                            var name = hs.overrides[i];
                            this[name] = params && typeof params[name] != 'undefined' ?
                                params[name] : hs[name];
                        }
                Severity: Major
                Found in assets/js/highslide-with-gallery.js and 2 other locations - About 2 hrs to fix
                assets/js/highslide-full.js on lines 1381..1385
                assets/js/highslide.js on lines 999..1003

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

                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

                            var after = up ?
                                function () {
                
                                    if (exp.outline) exp.outline.table.style.visibility = "visible";
                                    setTimeout(function () {
                Severity: Major
                Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                assets/js/highslide-full.js on lines 2048..2058
                assets/js/highslide-with-gallery.js on lines 1578..1588

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

                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

                        for (var i = 0; i < hs.overrides.length; i++) {
                            var name = hs.overrides[i];
                            this[name] = params && typeof params[name] != 'undefined' ?
                                params[name] : hs[name];
                        }
                Severity: Major
                Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
                assets/js/highslide-full.js on lines 1381..1385
                assets/js/highslide-with-gallery.js on lines 1186..1190

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

                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

                            for (var n in names) {
                                this[n] = names[n].content.cloneNode(1);
                                hs.setStyles(this[n], {
                                    position: 'absolute',
                                    border: 0,
                Severity: Major
                Found in assets/js/highslide-full.js and 1 other location - About 2 hrs to fix
                assets/js/highslide-with-gallery.js on lines 1700..1708

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

                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

                            for (var n in names) {
                                this[n] = names[n].content.cloneNode(1);
                                hs.setStyles(this[n], {
                                    position: 'absolute',
                                    border: 0,
                Severity: Major
                Found in assets/js/highslide-with-gallery.js and 1 other location - About 2 hrs to fix
                assets/js/highslide-full.js on lines 2183..2191

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

                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 fade has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                        fade: function (up, to) {
                            this.outlineWhileAnimating = false;
                            var exp = this, t = up ? hs.expandDuration : 0;
                
                            if (up) {
                Severity: Minor
                Found in assets/js/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 fade has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
                Open

                        fade: function (up, to) {
                            this.outlineWhileAnimating = false;
                            var exp = this, t = up ? hs.expandDuration : 0;
                
                            if (up) {
                Severity: Minor
                Found in assets/js/highslide-with-gallery.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