modxcms/revolution

View on GitHub

Showing 7,873 of 7,873 total issues

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

            els.navNext.on('click', function(ev) {
                ev.preventDefault();
                this.setImage(activeImage + 1);
            }, this);
Severity: Minor
Found in manager/assets/modext/util/lightbox.js and 1 other location - About 40 mins to fix
manager/assets/modext/util/lightbox.js on lines 112..115

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

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

                if (typeof(c[i].renderer) == 'string') {
                    c[i].renderer = eval(c[i].renderer);
                }
Severity: Minor
Found in manager/assets/modext/widgets/core/modx.grid.js and 2 other locations - About 40 mins to fix
manager/assets/modext/widgets/core/modx.grid.js on lines 357..359
manager/assets/modext/widgets/core/modx.grid.js on lines 680..682

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

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

                if (isset($_is_stringy[ $template->source->type ])) {
                    $this->template_data[ $this->index ][ $key ][ 'name' ] =
                        '\'' . substr($template->source->name, 0, 25) . '...\'';
                } else {
                    $this->template_data[ $this->index ][ $key ][ 'name' ] = $template->source->filepath;
Severity: Minor
Found in core/model/smarty/sysplugins/smarty_internal_debug.php and 1 other location - About 40 mins to fix
core/model/smarty/sysplugins/smarty_internal_debug.php on lines 366..371

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

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

<?php
/**
 * @package modx
 * @subpackage mysql
 */
Severity: Major
Found in core/model/modx/mysql/modaccesstemplatevar.map.inc.php and 4 other locations - About 40 mins to fix
core/model/modx/mysql/modaccessaction.map.inc.php on lines 1..32
core/model/modx/mysql/modaccessactiondom.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesscontext.map.inc.php on lines 1..32
core/model/modx/mysql/modaccessmenu.map.inc.php on lines 1..32

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

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

<?php
/**
 * @package modx
 * @subpackage mysql
 */
Severity: Major
Found in core/model/modx/mysql/modaccessmenu.map.inc.php and 4 other locations - About 40 mins to fix
core/model/modx/mysql/modaccessaction.map.inc.php on lines 1..32
core/model/modx/mysql/modaccessactiondom.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesscontext.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesstemplatevar.map.inc.php on lines 1..32

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

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

<?php
/**
 * @package modx
 * @subpackage mysql
 */
Severity: Major
Found in core/model/modx/mysql/modaccesscontext.map.inc.php and 4 other locations - About 40 mins to fix
core/model/modx/mysql/modaccessaction.map.inc.php on lines 1..32
core/model/modx/mysql/modaccessactiondom.map.inc.php on lines 1..32
core/model/modx/mysql/modaccessmenu.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesstemplatevar.map.inc.php on lines 1..32

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

            if (isset($_is_stringy[ $template->source->type ])) {
                $this->template_data[ $this->index ][ $key ][ 'name' ] =
                    '\'' . substr($template->source->name, 0, 25) . '...\'';
            } else {
                $this->template_data[ $this->index ][ $key ][ 'name' ] = $template->source->filepath;
Severity: Minor
Found in core/model/smarty/sysplugins/smarty_internal_debug.php and 1 other location - About 40 mins to fix
core/model/smarty/sysplugins/smarty_internal_debug.php on lines 88..93

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

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

<?php
/**
 * @package modx
 * @subpackage mysql
 */
Severity: Major
Found in core/model/modx/mysql/modaccessaction.map.inc.php and 4 other locations - About 40 mins to fix
core/model/modx/mysql/modaccessactiondom.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesscontext.map.inc.php on lines 1..32
core/model/modx/mysql/modaccessmenu.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesstemplatevar.map.inc.php on lines 1..32

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

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

<?php
/**
 * @package modx
 * @subpackage mysql
 */
Severity: Major
Found in core/model/modx/mysql/modaccessactiondom.map.inc.php and 4 other locations - About 40 mins to fix
core/model/modx/mysql/modaccessaction.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesscontext.map.inc.php on lines 1..32
core/model/modx/mysql/modaccessmenu.map.inc.php on lines 1..32
core/model/modx/mysql/modaccesstemplatevar.map.inc.php on lines 1..32

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

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

<?php
/*
 * This file is part of MODX Revolution.
 *
 * Copyright (c) MODX, LLC. All Rights Reserved.
core/model/modx/processors/security/user/setting/getlist.class.php on lines 1..48

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

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

            'thumbnailType' => array(
                'name' => 'thumbnailType',
                'desc' => 'prop_file.thumbnailType_desc',
                'type' => 'list',
                'options' => array(
Severity: Minor
Found in core/model/modx/sources/modfilemediasource.class.php and 1 other location - About 40 mins to fix
core/model/modx/sources/mods3mediasource.class.php on lines 1171..1183

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

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

            'thumbnailType' => array(
                'name' => 'thumbnailType',
                'desc' => 'prop_s3.thumbnailType_desc',
                'type' => 'list',
                'options' => array(
Severity: Minor
Found in core/model/modx/sources/mods3mediasource.class.php and 1 other location - About 40 mins to fix
core/model/modx/sources/modfilemediasource.class.php on lines 1298..1310

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

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

<?php
/*
 * This file is part of MODX Revolution.
 *
 * Copyright (c) MODX, LLC. All Rights Reserved.
core/model/modx/processors/security/group/setting/getlist.class.php on lines 1..47

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

Function animate has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

        animate : function(args, duration, onComplete, easing, animType){       
Severity: Minor
Found in setup/assets/js/ext-core-debug.js - About 35 mins to fix

    Function backOut has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            backOut: function (t, b, c, d, s) {
    Severity: Minor
    Found in setup/assets/js/ext-core-debug.js - About 35 mins to fix

      Function byAttribute has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          function byAttribute(cs, attr, value, op, custom){
      Severity: Minor
      Found in setup/assets/js/ext-core-debug.js - About 35 mins to fix

        Function backBoth has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                backBoth: function (t, b, c, d, s) {
        Severity: Minor
        Found in setup/assets/js/ext-core-debug.js - About 35 mins to fix

          Function listen has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              function listen(element, ename, opt, fn, scope){
          Severity: Minor
          Found in setup/assets/js/ext-core-debug.js - About 35 mins to fix

            Function _emit has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function _emit(target, fn, name, res, ext){
            Severity: Minor
            Found in manager/assets/fileapi/FileAPI.js - About 35 mins to fix

              Function addListener has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  function addListener(el, ename, fn, wrap, scope){        
              Severity: Minor
              Found in setup/assets/js/ext-core-debug.js - About 35 mins to fix
                Severity
                Category
                Status
                Source
                Language