XoopsModules25x/apcal

View on GitHub

Showing 26,336 of 26,336 total issues

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

        if (!this.outlineType
            || (this.last && this.isImage && this.transitions[1] == 'crossfade')) {
            this[this.contentType + 'Create']();

        } else if (hs.pendingOutlines[this.outlineType]) {
Severity: Major
Found in assets/images/js/highslide/highslide-with-gallery.js and 1 other location - About 7 hrs to fix
assets/images/js/highslide/highslide-full.js on lines 1440..1457

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

Method list_blocks has 182 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function list_blocks()
{
    global $query4redirect, $block_arr, $xoopsGTicket;

    // cachetime options
Severity: Major
Found in admin/myblocksadmin.php - About 7 hrs to fix

    Function keyHandler has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

            keyHandler: function (e) {
                if (!e) e = window.event;
                if (!e.target) e.target = e.srcElement; // ie
                if (typeof e.target.form != 'undefined') return true; // form element has focus
                if (!hs.fireEvent(hs, 'onKeyDown', e)) return true;
    Severity: Minor
    Found in assets/images/js/highslide/highslide-full.js - About 7 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 Expander has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

        hs.Expander = function (a, params, custom, contentType) {
            if (document.readyState && hs.ie && !hs.isReady) {
                hs.addEventListener(document, 'ready', function () {
                    new hs.Expander(a, params, custom, contentType);
                });
    Severity: Minor
    Found in assets/images/js/highslide/highslide-with-gallery.js - About 7 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 rrule_from_post has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring.
    Open

            public function rrule_from_post($start, $allday_flag)
            {
                // �����֤�̵���ʤ顢̵���Ƕ�ʸ������֤�
                if ($_POST['rrule_freq'] === 'none') {
                    return '';
    Severity: Minor
    Found in class/APCal.php - About 7 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 4 locations. Consider refactoring.
    Open

        hs.extend(hs.fx, {
            step: {
    
                opacity: function (fx) {
                    hs.setStyles(fx.elem, {opacity: fx.now});
    Severity: Major
    Found in assets/images/js/highslide/highslide.js and 3 other locations - About 7 hrs to fix
    assets/images/js/highslide/highslide-full.js on lines 1092..1109
    assets/images/js/highslide/highslide-with-gallery.js on lines 912..929
    assets/images/js/highslide/highslide-with-html.js on lines 905..922

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

    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

        hs.extend(hs.fx, {
            step: {
    
                opacity: function (fx) {
                    hs.setStyles(fx.elem, {opacity: fx.now});
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-html.js and 3 other locations - About 7 hrs to fix
    assets/images/js/highslide/highslide-full.js on lines 1092..1109
    assets/images/js/highslide/highslide-with-gallery.js on lines 912..929
    assets/images/js/highslide/highslide.js on lines 739..756

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

    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

        hs.extend(hs.fx, {
            step: {
    
                opacity: function (fx) {
                    hs.setStyles(fx.elem, {opacity: fx.now});
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-gallery.js and 3 other locations - About 7 hrs to fix
    assets/images/js/highslide/highslide-full.js on lines 1092..1109
    assets/images/js/highslide/highslide-with-html.js on lines 905..922
    assets/images/js/highslide/highslide.js on lines 739..756

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

    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

        hs.extend(hs.fx, {
            step: {
    
                opacity: function (fx) {
                    hs.setStyles(fx.elem, {opacity: fx.now});
    Severity: Major
    Found in assets/images/js/highslide/highslide-full.js and 3 other locations - About 7 hrs to fix
    assets/images/js/highslide/highslide-with-gallery.js on lines 912..929
    assets/images/js/highslide/highslide-with-html.js on lines 905..922
    assets/images/js/highslide/highslide.js on lines 739..756

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

    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

            preloadAjaxElement: function (i) {
                if (!hs.preloadTheseAjax[i]) return;
                var a = hs.preloadTheseAjax[i];
                var cache = hs.getNode(hs.getParam(a, 'contentId'));
                if (!cache) cache = hs.getSelfRendered();
    Severity: Major
    Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 7 hrs to fix
    assets/images/js/highslide/highslide-with-html.js on lines 354..367

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

    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

            preloadAjaxElement: function (i) {
                if (!hs.preloadTheseAjax[i]) return;
                var a = hs.preloadTheseAjax[i];
                var cache = hs.getNode(hs.getParam(a, 'contentId'));
                if (!cache) cache = hs.getSelfRendered();
    Severity: Major
    Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 7 hrs to fix
    assets/images/js/highslide/highslide-full.js on lines 442..455

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

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

            public function update_schedule($set_sql_append = '', $whr_sql_append = '', $notify_callback = null)
            {
                if ($_POST['summary'] === '') {
                    $_POST['summary'] = _APCAL_MB_NOSUBJECT;
                }
    Severity: Major
    Found in class/APCal.php - About 7 hrs to fix

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

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

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

                    if (exp.isHtml) {
                        var d = exp.scrollerDiv;
                        if (this.sizeDiff === undefined)
                            this.sizeDiff = exp.innerContent['offset' + this.ucwh] - d['offset' + this.ucwh];
                        d.style[this.wh] = (this.size - this.sizeDiff) + 'px';
        Severity: Major
        Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 6 hrs to fix
        assets/images/js/highslide/highslide-with-html.js on lines 1142..1150

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

        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

                    if (exp.isHtml) {
                        var d = exp.scrollerDiv;
                        if (this.sizeDiff === undefined)
                            this.sizeDiff = exp.innerContent['offset' + this.ucwh] - d['offset' + this.ucwh];
                        d.style[this.wh] = (this.size - this.sizeDiff) + 'px';
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 6 hrs to fix
        assets/images/js/highslide/highslide-full.js on lines 1337..1345

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

        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

                fitOverlayBox: function (ratio, changed) {
                    var x = this.x, y = this.y;
                    if (this.overlayBox && (this.isImage || this.allowHeightReduction)) {
                        while (y.size > this.minHeight && x.size > this.minWidth
                        && y.get('wsize') > y.get('fitsize')) {
        Severity: Major
        Found in assets/images/js/highslide/highslide-with-html.js and 1 other location - About 6 hrs to fix
        assets/images/js/highslide/highslide-full.js on lines 1972..1984

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

        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

                fitOverlayBox: function (ratio, changed) {
                    var x = this.x, y = this.y;
                    if (this.overlayBox && (this.isImage || this.allowHeightReduction)) {
                        while (y.size > this.minHeight && x.size > this.minWidth
                        && y.get('wsize') > y.get('fitsize')) {
        Severity: Major
        Found in assets/images/js/highslide/highslide-full.js and 1 other location - About 6 hrs to fix
        assets/images/js/highslide/highslide-with-html.js on lines 1689..1701

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

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

            hs.Expander = function (a, params, custom, contentType) {
                if (document.readyState && hs.ie && !hs.isReady) {
                    hs.addEventListener(document, 'ready', function () {
                        new hs.Expander(a, params, custom, contentType);
                    });
        Severity: Minor
        Found in assets/images/js/highslide/highslide-with-html.js - About 6 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 keyHandler has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
        Open

                keyHandler: function (e) {
                    if (!e) e = window.event;
                    if (!e.target) e.target = e.srcElement; // ie
                    if (typeof e.target.form != 'undefined') return true; // form element has focus
                    var exp = hs.getExpander();
        Severity: Minor
        Found in assets/images/js/highslide/highslide-with-gallery.js - About 6 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 Expander has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring.
        Open

            hs.Expander = function (a, params, custom, contentType) {
                if (document.readyState && hs.ie && !hs.isReady) {
                    hs.addEventListener(document, 'ready', function () {
                        new hs.Expander(a, params, custom, contentType);
                    });
        Severity: Minor
        Found in assets/images/js/highslide/highslide.js - About 6 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