mambax7/extcal

View on GitHub

Showing 1,163 of 1,163 total issues

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

            if (isNew) {
                if (hs.geckoMac && hs.dimmingGeckoFix)
                    hs.setStyles(hs.dimmer, {
                        background: 'url(' + hs.graphicsDir + 'geckodimmer.png)',
                        opacity: 1
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 401..409

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

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

        changeSize: function (up, to, dur) {
            // transition
            var trans = this.transitions,
                other = up ? (this.last ? this.last.a : null) : hs.upcoming,
                t = (trans[1] && other
Severity: Major
Found in assets/js/highslide-full.js - About 2 hrs to fix

    Function updateAnchors has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

            updateAnchors: function () {
                var el, els, all = [], images = [], htmls = [], groups = {}, re;
    
                for (var i = 0; i < hs.openerTagNames.length; i++) {
                    els = document.getElementsByTagName(hs.openerTagNames[i]);
    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 focus has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

            focus: function () {
                this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                // blur others
                for (var i = 0; i < hs.expanders.length; i++) {
                    if (hs.expanders[i] && i == hs.focusKey) {
    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

    Function focus has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

            focus: function () {
                this.wrapper.style.zIndex = hs.zIndexCounter += 2;
                // blur others
                for (var i = 0; i < hs.expanders.length; i++) {
                    if (hs.expanders[i] && i == hs.focusKey) {
    Severity: Minor
    Found in assets/js/highslide.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 getOverlays has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

            getOverlays: function () {
                this.getInline(['heading', 'caption'], true);
                if (this.heading && this.dragByHeading) this.heading.className += ' highslide-move';
                if (hs.showCredits) this.writeCredits();
                for (var i = 0; i < hs.overlays.length; i++) {
    Severity: Minor
    Found in assets/js/highslide.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 bExtcalMinicalShow has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

    function bExtcalMinicalShow($options)
    {
        global $xoopsUser;
    
        extcal_getDefautminicalOption($options);
    Severity: Minor
    Found in blocks/minical.php - 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 createOverlay has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

            createOverlay: function (o) {
                var el = o.overlayId;
                if (typeof el == 'string') el = hs.getNode(el);
                if (o.html) el = hs.createElement('div', {innerHTML: o.html});
                if (!el || typeof el == 'string') return;
    Severity: Minor
    Found in assets/js/highslide.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 PclTarExtractList has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        function PclTarExtractList($p_tarname, $p_filelist, $p_path = './', $p_remove_path = '', $p_mode = '')
        {
            TrFctStart(__FILE__, __LINE__, 'PclTarExtractList', "tar=$p_tarname, list, path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
            $v_result = 1;
    
    
    Severity: Minor
    Found in class/pcltar.lib.php - 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 getSearchEvents has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        public function getSearchEvents(
            $year = 0,
            $month = 0,
            $day = 0,
            $cat = 0,
    Severity: Minor
    Found in class/EventHandler.php - 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 checkVerModule has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function checkVerModule($helper, $source = 'github', $default = 'master')
        {
            $moduleDirName      = \basename(\dirname(__DIR__, 2));
            $moduleDirNameUpper = mb_strtoupper($moduleDirName);
            $update             = '';
    Severity: Minor
    Found in class/Common/VersionChecks.php - About 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 PclTarDelete has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        function PclTarDelete($p_tarname, $p_filelist, $p_mode = '')
        {
            TrFctStart(__FILE__, __LINE__, 'PclTarDelete', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
            $v_result = 1;
    
    
    Severity: Minor
    Found in class/pcltar.lib.php - 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 PclTarUpdate has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        function PclTarUpdate($p_tarname, $p_filelist, $p_mode = '', $p_add_dir = '', $p_remove_dir = '')
        {
            TrFctStart(__FILE__, __LINE__, 'PclTarUpdate', "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
            $v_result = 1;
    
    
    Severity: Minor
    Found in class/pcltar.lib.php - 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 PclTarExtractIndex has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
    Open

        function PclTarExtractIndex($p_tarname, $p_index, $p_path = './', $p_remove_path = '', $p_mode = '')
        {
            TrFctStart(__FILE__, __LINE__, 'PclTarExtractIndex', "tar=$p_tarname, index='$p_index', path=$p_path, remove_path='$p_remove_path', mode='$p_mode'");
            $v_result = 1;
    
    
    Severity: Minor
    Found in class/pcltar.lib.php - 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

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

            $cachetimes  = [
                0 => _NOCACHE,
                30 => sprintf(_SECONDS, 30),
                60 => _MINUTE,
                300 => sprintf(_MINUTES, 5),
    Severity: Major
    Found in admin/blocksadmin.php and 1 other location - About 2 hrs to fix
    admin/blockform.php on lines 86..98

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

    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

        [
            0       => _NOCACHE,
            30      => sprintf(_SECONDS, 30),
            60      => _MINUTE,
            300     => sprintf(_MINUTES, 5),
    Severity: Major
    Found in admin/blockform.php and 1 other location - About 2 hrs to fix
    admin/blocksadmin.php on lines 118..130

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

    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

            getAnchorIndex: function () {
                var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
                if (arr) for (var i = 0; i < arr.length; i++) {
                    if (arr[i] == this.a) return i;
                }
    Severity: Major
    Found in assets/js/highslide.js and 2 other locations - About 2 hrs to fix
    assets/js/highslide-full.js on lines 2362..2368
    assets/js/highslide-with-gallery.js on lines 1860..1866

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

    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

            getAnchorIndex: function () {
                var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
                if (arr) for (var i = 0; i < arr.length; i++) {
                    if (arr[i] == this.a) return i;
                }
    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 1860..1866
    assets/js/highslide.js on lines 1412..1418

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

    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

            getAnchorIndex: function () {
                var arr = hs.getAnchors().groups[this.slideshowGroup || 'none'];
                if (arr) for (var i = 0; i < arr.length; i++) {
                    if (arr[i] == this.a) return i;
                }
    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 2362..2368
    assets/js/highslide.js on lines 1412..1418

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

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

        function PclTarHandleExtractByIndex(
            $p_tar,
            &$p_index_current,
            $p_index_start,
            $p_index_stop,
    Severity: Major
    Found in class/pcltar.lib.php - About 2 hrs to fix
      Severity
      Category
      Status
      Source
      Language