modxcms/revolution

View on GitHub

Showing 7,873 of 7,873 total issues

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'user_occurred' => 
    array (
      'alias' => 'user_occurred',
Severity: Major
Found in core/model/modx/mysql/modmanagerlog.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/mysql/modtemplatevartemplate.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/mysql/modusergroupsetting.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/sqlsrv/modusergroupsetting.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/mysql/modcategoryclosure.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/sqlsrv/modcategoryclosure.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/mysql/modusersetting.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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 (empty($settingArray['name_trans'])) {
            if ($this->modx->lexicon->exists($k)) {
                $settingArray['name_trans'] = $this->modx->lexicon($k);
                $settingArray['name'] = $k;
            } else {
Severity: Minor
Found in core/model/modx/processors/system/settings/getlist.class.php and 1 other location - About 35 mins to fix
core/model/modx/processors/context/setting/getlist.class.php on lines 123..132

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
Severity: Major
Found in core/model/modx/sqlsrv/modusersetting.map.inc.php and 12 other locations - About 35 mins to fix
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modformcustomizationprofileusergroup.map.inc.php on lines 41..65
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101

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

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 ($source instanceof Minify_Source) {
                $max = max($max, $source->lastModified);
            } elseif (is_string($source)) {
                if (0 === strpos($source, '//')) {
                    $source = $_SERVER['DOCUMENT_ROOT'] . substr($source, 1);
Severity: Minor
Found in manager/min/lib/Minify/Build.php and 1 other location - About 35 mins to fix
manager/min/lib/Minify/HTML/Helper.php on lines 117..126

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

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 (is_object($source) && isset($source->lastModified)) {
                $max = max($max, $source->lastModified);
            } elseif (is_string($source)) {
                if (0 === strpos($source, '//')) {
                    $source = $_SERVER['DOCUMENT_ROOT'] . substr($source, 1);
Severity: Minor
Found in manager/min/lib/Minify/HTML/Helper.php and 1 other location - About 35 mins to fix
manager/min/lib/Minify/Build.php on lines 90..99

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

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

  'indexes' => 
  array (
    'PRIMARY' => 
    array (
      'alias' => 'PRIMARY',
core/model/modx/mysql/modcategoryclosure.map.inc.php on lines 53..77
core/model/modx/mysql/modmanagerlog.map.inc.php on lines 66..90
core/model/modx/mysql/modtemplatevartemplate.map.inc.php on lines 50..74
core/model/modx/mysql/modusergroupsetting.map.inc.php on lines 82..106
core/model/modx/mysql/modusersetting.map.inc.php on lines 83..107
core/model/modx/sources/mysql/modmediasourcecontext.map.inc.php on lines 41..65
core/model/modx/sources/sqlsrv/modmediasourcecontext.map.inc.php on lines 36..60
core/model/modx/sqlsrv/modcategoryclosure.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modformcustomizationprofileusergroup.map.inc.php on lines 35..59
core/model/modx/sqlsrv/modtemplatevartemplate.map.inc.php on lines 43..67
core/model/modx/sqlsrv/modusergroupsetting.map.inc.php on lines 77..101
core/model/modx/sqlsrv/modusersetting.map.inc.php on lines 77..101

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

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

    public function loadCustomCssJs() {
        $mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
        $this->addJavascript($mgrUrl.'assets/modext/widgets/resource/modx.tree.resource.simple.js');
        $this->addJavascript($mgrUrl.'assets/modext/widgets/security/modx.tree.resource.group.js');
        $this->addJavascript($mgrUrl.'assets/modext/widgets/security/modx.panel.resource.group.js');
manager/controllers/default/element/propertyset/index.class.php on lines 30..40
manager/controllers/default/workspaces/package/view.class.php on lines 30..41

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

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 (empty($settingArray['name_trans'])) {
            if ($this->modx->lexicon->exists($k)) {
                $settingArray['name_trans'] = $this->modx->lexicon($k);
                $settingArray['name'] = $k;
            } else {
Severity: Minor
Found in core/model/modx/processors/context/setting/getlist.class.php and 1 other location - About 35 mins to fix
core/model/modx/processors/system/settings/getlist.class.php on lines 128..137

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

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

    public function loadCustomCssJs() {
        $mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
        $this->addJavascript($mgrUrl.'assets/modext/workspace/combos.js');
        $this->addJavascript($mgrUrl.'assets/modext/workspace/package/package.versions.grid.js');
        $this->addJavascript($mgrUrl.'assets/modext/workspace/package/package.panel.js');
Severity: Minor
Found in manager/controllers/default/workspaces/package/view.class.php and 2 other locations - About 35 mins to fix
manager/controllers/default/element/propertyset/index.class.php on lines 30..40
manager/controllers/default/security/resourcegroup/index.class.php on lines 30..40

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

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

    public function loadCustomCssJs() {
        $mgrUrl = $this->modx->getOption('manager_url',null,MODX_MANAGER_URL);
        $this->addJavascript($mgrUrl.'assets/modext/widgets/core/modx.grid.local.property.js');
        $this->addJavascript($mgrUrl.'assets/modext/widgets/element/modx.grid.element.properties.js');
        $this->addJavascript($mgrUrl.'assets/modext/widgets/element/modx.panel.property.set.js');
manager/controllers/default/security/resourcegroup/index.class.php on lines 30..40
manager/controllers/default/workspaces/package/view.class.php on lines 30..41

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

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