partkeepr/PartKeepr

View on GitHub
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js

Summary

Maintainability
F
3 wks
Test Coverage

Function createFilterFields has 804 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    createFilterFields: function ()
    {

        // Create the storage location filter field
        this.storageLocationFilter = Ext.create("PartKeepr.StorageLocationComboBox", {

    File PartFilterPanel.js has 994 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * Defines the part filter panel.
     *
     *
     */

      Function createFilterFields has a Cognitive Complexity of 89 (exceeds 5 allowed). Consider refactoring.
      Open

          createFilterFields: function ()
          {
      
              // Create the storage location filter field
              this.storageLocationFilter = Ext.create("PartKeepr.StorageLocationComboBox", {

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function initComponent has 63 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          initComponent: function ()
          {
      
              // Create the filter fields
              this.createFilterFields();

        Function getFilterFn has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                                getFilterFn: function ()
                                {
                                    if (this.partManager !== null) {
                                        if (this.categoryFilter.getValue().category === "all") {
                                            if (this.partManager.getSelectedCategory() !== null) {

          Avoid deeply nested control flow statements.
          Open

                                                  if (!this.partManager.getSelectedCategory().isRoot()) {
                                                      return {
                                                          id: 'categoryFilter',
                                                          property: 'category',
                                                          operator: 'IN',

            Function _onFilterRemove has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                _onFilterRemove: function ()
                {
                    var filterPlugin;
                    if (this.suspendRemovals) {
                        return;

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function getFilters has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                getFilters: function ()
                {
                    var enableFilters = [],
                        disableFilters = [],
                        filterPlugin;

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function onApply has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

                onApply: function ()
                {
                    var i;
            
                    this.appliedFilters = this.getFilters();

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

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

                    this.distributorOrderNumberFilter = Ext.create("Ext.form.field.Text", {
                        fieldLabel: i18n("Order Number"),
                        anchor: '100%',
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 546..580
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 953..987
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 991..1025
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 1086..1120

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

            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

                    this.conditionFilter = Ext.create("Ext.form.field.Text", {
                        fieldLabel: i18n("Condition"),
                        anchor: '100%',
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 508..542
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 546..580
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 991..1025
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 1086..1120

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

            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

                    this.manufacturerPartNumberFilter = Ext.create("Ext.form.field.Text", {
                        fieldLabel: i18n("Manufacturer Part Number"),
                        anchor: '100%',
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 508..542
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 953..987
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 991..1025
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 1086..1120

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

            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

                    this.internalPartNumberFilter = Ext.create("Ext.form.field.Text", {
                        fieldLabel: i18n("Internal Part Number"),
                        anchor: '100%',
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 508..542
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 546..580
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 953..987
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 1086..1120

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

            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

                    this.commentFilter = Ext.create("Ext.form.field.Text", {
                        fieldLabel: i18n("Comment"),
                        anchor: '100%',
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 508..542
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 546..580
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 953..987
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 991..1025

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

            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

                    this.manufacturerFilterCombo = Ext.create("PartKeepr.ManufacturerComboBox", {
                        flex: 1,
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
                                getFilterFn: function ()
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 815..847
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 871..903

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

            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

                    this.distributorFilterCombo = Ext.create("PartKeepr.DistributorComboBox", {
                        flex: 1,
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
                                getFilterFn: function ()
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 760..792
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 871..903

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

            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

                    this.partsWithoutStockRemovals = Ext.create("Ext.form.field.Checkbox", {
                        fieldLabel: i18n("Stock Settings"),
                        boxLabel: i18n("Show Parts without stock removals only"),
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 705..742

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

            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

                    this.needsReview = Ext.create("Ext.form.field.Checkbox", {
                        fieldLabel: i18n("Needs Review"),
                        boxLabel: i18n("Show Parts that need to reviewed only"),
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 664..701

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

            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

                    this.footprintFilterCombo = Ext.create("PartKeepr.FootprintComboBox", {
                        flex: 1,
                        plugins: [
                            Ext.create("PartKeepr.Util.FilterPlugin", {
                                getFilterFn: function ()
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 760..792
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 815..847

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

            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: {
                            change: function ()
                            {
                                if (this.createDateFilterSelect.getValue() !== "" && this.createDateField.getValue() !== "") {
                                    this.createDateFilter.enableFilter();
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 619..629

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

            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: {
                            select: function ()
                            {
                                if (this.createDateFilterSelect.getValue() !== "" && this.createDateField.getValue() !== "") {
                                    this.createDateFilter.enableFilter();
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 586..597

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

            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.appliedFilters.enableFilters.length !== 0) {
                        for (i = 0; i < this.appliedFilters.enableFilters.length; i++) {
                            this.store.addFilter(this.appliedFilters.enableFilters[i], true);
                        }
                    }
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 185..189

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

            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.appliedFilters.disableFilters.length !== 0) {
                        for (i = 0; i < this.appliedFilters.disableFilters.length; i++) {
                            this.store.removeFilter(this.appliedFilters.disableFilters[i], true);
                        }
                    }
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 191..195

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

            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

                    this.storageLocationFilterCheckbox = Ext.create("Ext.form.field.Checkbox", {
                        width: "20px",
                        listeners: {
                            change: function (obj, value)
                            {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 746..758
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 802..813
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 858..869

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

            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

                    this.manufacturerFilterCheckbox = Ext.create("Ext.form.field.Checkbox", {
                        width: "20px",
                        listeners: {
                            change: function (obj, value)
                            {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 284..295
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 802..813
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 858..869

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

            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

                    this.distributorFilterCheckbox = Ext.create("Ext.form.field.Checkbox", {
                        width: "20px",
                        listeners: {
                            change: function (obj, value)
                            {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 284..295
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 746..758
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 858..869

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

            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

                    this.footprintFilterCheckbox = Ext.create("Ext.form.field.Checkbox", {
                        width: "20px",
                        listeners: {
                            change: function (obj, value)
                            {
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 284..295
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 746..758
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 802..813

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

            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

                    this.distributorFilter = Ext.create("Ext.form.FieldContainer", {
                        layout: 'hbox',
                        items: [this.distributorFilterCheckbox, this.distributorFilterCombo],
                        fieldLabel: i18n("Distributor"),
            
            
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 796..800

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

            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

                    this.manufacturerFilter = Ext.create("Ext.form.FieldContainer", {
                        layout: 'hbox',
                        items: [this.manufacturerFilterCheckbox, this.manufacturerFilterCombo],
                        fieldLabel: i18n("Manufacturer")
                    });
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartFilterPanel.js on lines 849..854

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

            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

                            render: function (c)
                            {
                                Ext.QuickTips.register({
                                    target: c.getEl(),
                                    text: c.qtip
            src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartEditor.js on lines 194..200

            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

            There are no issues that match your filters.

            Category
            Status