partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

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

        this.toolbarAddButton = Ext.create("Ext.button.Button", {
            tooltip: i18n("Add Category"),
            handler: Ext.bind(this.showCategoryAddDialog, this),
            iconCls: 'web-icon folder_add',
            disabled: true
src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js on lines 132..137
src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js on lines 139..144

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

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

    statics: {
        iconCls: 'web-icon chart_bar',
        title: i18n('Summary'),
        closable: true,
        menuPath: [{text: i18n("View")}, {text: i18n("Statistics"), iconCls: "web-icon chart_bar"}]
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Statistics/StatisticsChartPanel.js on lines 83..88
src/PartKeepr/FrontendBundle/Resources/public/js/Components/ThemeTester/ThemeTester.js on lines 1015..1024

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

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

    getFramedGrid: function () {
        return this.applySizing('framedGrid', {
            xtype: 'grid',
            title: 'Framed Grid',
            collapsible: true,

    Function getScrollingTabs has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        getScrollingTabs: function () {
            return this.applySizing('scrollingTabs', this.getTabs({
                enableTabScroll: true,
                plain: true,
                items: [{

      Function encode_base64 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      bCrypt.prototype.encode_base64 = function(d, len) {
          var off = 0;
          var rs = [];
          var c1;
          var c2;

        Function onEditComplete has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            onEditComplete: function (ed, value, startValue)
            {
                var me = this,
                    context = ed.context,
                    view, record;

          Method testOrFilterJoin has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testOrFilterJoin()
              {
                  $client = static::makeClient(true);
          
                  $filter = [

            Method testOrFilter has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function testOrFilter()
                {
                    $client = static::makeClient(true);
            
                    $filter = [

              Method extractJSONSorters has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function extractJSONSorters(
                      $data
                  ) {
                      $sorter = new Sorter();
              
              

                Method getPartsByQueryAction has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getPartsByQueryAction(Request $request)
                    {
                        $start = 1;
                
                        $responseData = [];
                Severity: Minor
                Found in src/PartKeepr/OctoPartBundle/Controller/DefaultController.php - About 1 hr to fix

                  Method theme_image has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          def theme_image(theme, path, without_url = false, relative = false)
                            path = path.value
                            theme = theme.value
                            without_url = (without_url.class == FalseClass) ? without_url : without_url.value
                            
                  Severity: Minor
                  Found in theme/themes/lib/utils.rb - About 1 hr to fix

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

                        statics: {
                            rendererName: i18n("Part Parameter Renderer"),
                            rendererDescription: i18n("Renders a specific part parameter"),
                            rendererConfigs: {
                                parameterName: {
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Renderers/PartParameterRenderer.js on lines 26..36
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/Renderers/QuantityRenderer.js on lines 47..58

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

                    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

                        statics: {
                            rendererName: i18n("Project Report Quantity Renderer"),
                            rendererDescription: i18n("Renders the amount of required metadata quantities"),
                            rendererConfigs: {
                                parameterName: {
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Renderers/PartParameterRenderer.js on lines 26..36
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/Renderers/ProjectPartParameterRenderer.js on lines 26..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 57.

                    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

                        statics: {
                            rendererName: i18n("Part Parameter Renderer"),
                            rendererDescription: i18n("Renders a specific part parameter"),
                            rendererConfigs: {
                                parameterName: {
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/Renderers/ProjectPartParameterRenderer.js on lines 26..36
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/Renderers/QuantityRenderer.js on lines 47..58

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

                    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

                            } else {
                                this.down("#importFieldMatcherGrid").disable();
                                this.down("#dontUpdateData").disable();
                                this.down("#updateData").disable();
                            }
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/ImporterEntityConfiguration.js on lines 77..81

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

                    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 (value.get("valueType") === "string") {
                                this.down("#operator").getStore().filter("string", true);
                                this.down("#operator").getStore().filter("type", "scalar");
                            } else {
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/PartParameterSearch.js on lines 153..156

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

                    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 (this.record.manufacturers().getCount() < minManufacturerCount) {
                                errors.push(
                                    Ext.String.format(i18n("The number of manufacturers must be greater than {0}"), minManufacturerCount));
                            }
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js on lines 370..373

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

                    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

                                            listeners: {
                                                scope: this,
                                                disable: function ()
                                                {
                                                    if (this.categoryFilter !== null) {
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 417..426

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

                    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

                                        listeners: {
                                            scope: this,
                                            disable: function ()
                                            {
                                                if (this.categoryFilter !== null) {
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 344..353

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

                    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

                            } else {
                                this.down("#operator").getStore().filter("numeric", true);
                                this.down("#operator").getStore().filter("type", "scalar");
                            }
                    src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/PartParameterSearch.js on lines 150..153

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

                    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