modxcms/revolution

View on GitHub
manager/assets/modext/widgets/modx.panel.search.js

Summary

Maintainability
F
5 days
Test Coverage

Function getFields has 170 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    ,getFields: function(config) {
        return [{
            layout: 'column'
            ,border: false
            ,defaults: {
Severity: Major
Found in manager/assets/modext/widgets/modx.panel.search.js - About 6 hrs to fix

    File modx.panel.search.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Loads the search filter panel
     *
     * @class MODx.panel.Search
     * @extends MODx.FormPanel
    Severity: Minor
    Found in manager/assets/modext/widgets/modx.panel.search.js - About 2 hrs to fix

      Function Search has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      MODx.grid.Search = function(config) {
          config = config || {};
          Ext.applyIf(config,{
              title: _('search_results')
              ,id: 'modx-grid-search'
      Severity: Minor
      Found in manager/assets/modext/widgets/modx.panel.search.js - About 1 hr to fix

        Function Search has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        MODx.panel.Search = function(config) {
            config = config || {};
            Ext.applyIf(config,{
                id: 'modx-panel-search'
                ,cls: 'container form-with-labels'
        Severity: Minor
        Found in manager/assets/modext/widgets/modx.panel.search.js - About 1 hr to fix

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

                              },{
                                  columnWidth: .5
                                  ,items: [{
                                      xtype: 'textfield'
                                      ,name: 'parent'
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 1 other location - About 1 day to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 136..169

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

          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

                              ,items: [{
                                  columnWidth: .5
                                  ,items: [{
                                      xtype: 'textfield'
                                      ,name: 'id'
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 1 other location - About 1 day to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 169..202

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

          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

                          ,items: [{
                              xtype: 'textfield'
                              ,name: 'pagetitle'
                              ,id: 'modx-search-pagetitle'
                              ,fieldLabel: _('pagetitle')
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 3 other locations - About 2 hrs to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 69..80
          manager/assets/modext/widgets/modx.panel.search.js on lines 105..116
          manager/assets/modext/widgets/modx.panel.search.js on lines 116..127

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

          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

                          ,items: [{
                              xtype: 'textfield'
                              ,name: 'alias'
                              ,id: 'modx-search-alias'
                              ,fieldLabel: _('alias')
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 3 other locations - About 2 hrs to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 58..69
          manager/assets/modext/widgets/modx.panel.search.js on lines 69..80
          manager/assets/modext/widgets/modx.panel.search.js on lines 116..127

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

          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

                          },{
                              xtype: 'textfield'
                              ,name: 'longtitle'
                              ,id: 'modx-search-longtitle'
                              ,fieldLabel: _('long_title')
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 3 other locations - About 2 hrs to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 58..69
          manager/assets/modext/widgets/modx.panel.search.js on lines 105..116
          manager/assets/modext/widgets/modx.panel.search.js on lines 116..127

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

          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

                          },{
                              xtype: 'textfield'
                              ,name: 'menutitle'
                              ,id: 'modx-search-menutitle'
                              ,fieldLabel: _('resource_menutitle')
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 3 other locations - About 2 hrs to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 58..69
          manager/assets/modext/widgets/modx.panel.search.js on lines 69..80
          manager/assets/modext/widgets/modx.panel.search.js on lines 105..116

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

          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

                          },{
                              xtype: 'textfield'
                              ,fieldLabel: _('resource_description')
                              ,name: 'description'
                              ,id: 'modx-search-description'
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 1 other location - About 2 hrs to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 80..91

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

          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

                          },{
                              xtype: 'textfield'
                              ,fieldLabel: _('resource_summary')
                              ,name: 'introtext'
                              ,id: 'modx-search-introtext'
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 1 other location - About 2 hrs to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 91..102

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

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

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

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

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

          Refactorings

          Further Reading

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

              ,_addEnterKeyHandler: function() {
                  this.getEl().addKeyListener(Ext.EventObject.ENTER,function() {
                      this.fireEvent('change');
                  },this);
              }
          Severity: Major
          Found in manager/assets/modext/widgets/modx.panel.search.js and 2 other locations - About 55 mins to fix
          manager/assets/modext/widgets/core/modx.grid.settings.js on lines 186..190
          manager/assets/modext/widgets/system/modx.grid.manager.log.js on lines 200..204

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

          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

                  },{
                      header: _('published')
                      ,dataIndex: 'published'
                      ,width: 30
                      ,editor: { xtype: 'combo-boolean' ,renderer: 'boolean' }
          Severity: Minor
          Found in manager/assets/modext/widgets/modx.panel.search.js and 1 other location - About 35 mins to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 279..286

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

          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

                  },{
                      header: _('deleted')
                      ,dataIndex: 'deleted'
                      ,width: 30
                      ,editor: { xtype: 'combo-boolean' ,renderer: 'boolean' }
          Severity: Minor
          Found in manager/assets/modext/widgets/modx.panel.search.js and 1 other location - About 35 mins to fix
          manager/assets/modext/widgets/modx.panel.search.js on lines 272..279

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

          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

          There are no issues that match your filters.

          Category
          Status