modxcms/revolution

View on GitHub

Showing 7,873 of 7,873 total issues

Avoid too many return statements within this method.
Open

        return true;
Severity: Major
Found in core/model/phpthumb/phpthumb.class.php - About 30 mins to fix

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

            if (ui.hasClass('pnew')) {
                m.push({
                    text: _('context_duplicate')
                    ,handler: this.duplicateContext
                });
    Severity: Major
    Found in manager/assets/modext/widgets/resource/modx.tree.resource.js and 7 other locations - About 30 mins to fix
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 533..538
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 553..558
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 559..564
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 576..581
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 582..587
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 595..600
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 619..624

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

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

            if (ui.hasClass('pedit')) {
                m.push({
                    text: _('resource_edit')
                    ,handler: this.editResource
                });
    Severity: Major
    Found in manager/assets/modext/widgets/resource/modx.tree.resource.js and 7 other locations - About 30 mins to fix
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 533..538
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 553..558
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 559..564
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 536..541
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 576..581
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 595..600
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 619..624

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

    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

            getCharCode : function(ev) {
                ev = ev.browserEvent || ev;
                return ev.charCode || ev.keyCode || 0;
            },
    Severity: Minor
    Found in manager/assets/ext3/adapter/ext/ext-base-debug.js and 1 other location - About 30 mins to fix
    setup/assets/js/ext-core-debug.js on lines 1008..1011

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

            return [{
                icon: iu + 'arrow_down.png'
                ,cls: 'x-btn-icon arrow_down'
                ,tooltip: {text: _('tree_expand')}
                ,handler: this.expandNodes
    Severity: Major
    Found in manager/assets/modext/widgets/core/tree/modx.tree.js and 3 other locations - About 30 mins to fix
    manager/assets/modext/widgets/core/modx.tree.column.js on lines 196..202
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 758..764
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 764..770

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

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

            },{
                icon: iu+'refresh.png'
                ,cls: 'x-btn-icon refresh'
                ,scope: this
                ,tooltip: {text: _('tree_refresh')}
    Severity: Minor
    Found in manager/assets/modext/widgets/core/modx.tree.checkbox.js and 2 other locations - About 30 mins to fix
    manager/assets/modext/widgets/core/modx.tree.checkbox.js on lines 178..184
    manager/assets/modext/widgets/core/modx.tree.checkbox.js on lines 184..190

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

            },{
                icon: iu + 'refresh.png'
                ,cls: 'x-btn-icon refresh'
                ,tooltip: {text: _('tree_refresh')}
                ,handler: this.refresh
    Severity: Major
    Found in manager/assets/modext/widgets/core/tree/modx.tree.js and 3 other locations - About 30 mins to fix
    manager/assets/modext/widgets/core/modx.tree.column.js on lines 196..202
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 752..758
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 758..764

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

    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

                ,listeners: {
                    'success':{fn:function(r) {
                        this.getStore().reload();
                    },scope:this}
                }
    Severity: Minor
    Found in manager/assets/modext/workspace/package.grid.js and 1 other location - About 30 mins to fix
    manager/assets/modext/workspace/package.grid.js on lines 337..341

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

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

            return [{
                icon: iu+'arrow_down.png'
                ,cls: 'x-btn-icon arrow_down'
                ,scope: this
                ,tooltip: {text: _('tree_expand')}
    Severity: Minor
    Found in manager/assets/modext/widgets/core/modx.tree.checkbox.js and 2 other locations - About 30 mins to fix
    manager/assets/modext/widgets/core/modx.tree.checkbox.js on lines 184..190
    manager/assets/modext/widgets/core/modx.tree.checkbox.js on lines 190..196

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

            },{
                icon: iu + 'arrow_up.png'
                ,cls: 'x-btn-icon arrow_up'
                ,tooltip: {text: _('tree_collapse')}
                ,handler: this.collapseNodes
    Severity: Major
    Found in manager/assets/modext/widgets/core/tree/modx.tree.js and 3 other locations - About 30 mins to fix
    manager/assets/modext/widgets/core/modx.tree.column.js on lines 196..202
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 752..758
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 764..770

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

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

            },{
                icon: iu+'arrow_up.png'
                ,cls: 'x-btn-icon arrow_up'
                ,scope: this
                ,tooltip: {text: _('tree_collapse')}
    Severity: Minor
    Found in manager/assets/modext/widgets/core/modx.tree.checkbox.js and 2 other locations - About 30 mins to fix
    manager/assets/modext/widgets/core/modx.tree.checkbox.js on lines 178..184
    manager/assets/modext/widgets/core/modx.tree.checkbox.js on lines 190..196

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

    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

               ,listeners: {
                    'success':{fn:function(r) {
                        this.getStore().reload();
                    },scope:this}
               }
    Severity: Minor
    Found in manager/assets/modext/workspace/package.grid.js and 1 other location - About 30 mins to fix
    manager/assets/modext/workspace/package.grid.js on lines 354..358

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

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

            m.push({
                text: _('quick_create')
                ,handler: function() {return false;}
                ,menu: {
                    items: mn
    Severity: Minor
    Found in manager/assets/modext/widgets/element/modx.tree.element.js and 2 other locations - About 30 mins to fix
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 702..706
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 708..712

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

    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

            },{
                id: this.ident+'-img-detail-panel'
                ,cls: 'modx-browser-details-ct'
                ,region: 'east'
                ,split: true
    Severity: Minor
    Found in manager/assets/modext/widgets/media/modx.browser.js and 1 other location - About 30 mins to fix
    manager/assets/modext/widgets/core/modx.rte.browser.js on lines 81..89

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

    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

            getCharCode : function(ev) {
                ev = ev.browserEvent || ev;
                return ev.charCode || ev.keyCode || 0;
            },
    Severity: Minor
    Found in setup/assets/js/ext-core-debug.js and 1 other location - About 30 mins to fix
    manager/assets/ext3/adapter/ext/ext-base-debug.js on lines 2147..2150

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

            return [{
                icon: iu+'refresh.png'
                ,cls: 'x-btn-icon'
                ,tooltip: {text: _('tree_refresh')}
                ,handler: this.refresh
    Severity: Major
    Found in manager/assets/modext/widgets/core/modx.tree.column.js and 3 other locations - About 30 mins to fix
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 752..758
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 758..764
    manager/assets/modext/widgets/core/tree/modx.tree.js on lines 764..770

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

    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

            },{
                id: this.ident+'-img-detail-panel'
                ,cls: 'modx-browser-details-ct'
                ,region: 'east'
                ,split: true
    Severity: Minor
    Found in manager/assets/modext/widgets/core/modx.rte.browser.js and 1 other location - About 30 mins to fix
    manager/assets/modext/widgets/media/modx.browser.js on lines 1284..1292

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

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

            m.push({
                text: _('create')
                ,handler: function() {return false;}
                ,menu: {items: ct}
            });
    Severity: Minor
    Found in manager/assets/modext/widgets/resource/modx.tree.resource.js and 2 other locations - About 30 mins to fix
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 455..461
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 708..712

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

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

                m.push({
                    text: _('quick_create')
                    ,handler: function() {return false;}
                    ,menu: {items: qct}
                });
    Severity: Minor
    Found in manager/assets/modext/widgets/resource/modx.tree.resource.js and 2 other locations - About 30 mins to fix
    manager/assets/modext/widgets/element/modx.tree.element.js on lines 455..461
    manager/assets/modext/widgets/resource/modx.tree.resource.js on lines 702..706

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

    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 (r.object.server_version_result != 'success') {
                                    sv.addClass('warning');
                                } else {
                                    sv.addClass('success');
                                }
    Severity: Minor
    Found in setup/assets/js/sections/database.js and 1 other location - About 30 mins to fix
    setup/assets/js/sections/database.js on lines 32..36

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

    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

    Severity
    Category
    Status
    Source
    Language