partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

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

        if (this.splitSearchTermSystemPreference !== null) {
            splitTerms = Boolean(PartKeepr.getApplication().getSystemPreference(this.splitSearchTermSystemPreference,
                this.splitSearchTermSystemPreferenceDefaults));
        }
src/PartKeepr/FrontendBundle/Resources/public/js/Data/store/BaseStore.js on lines 77..80

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

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

        this.bottomToolbar = Ext.create("PartKeepr.PagingToolbar", {
            store: this.store,
            enableOverflow: true,
            dock: 'bottom',
            displayInfo: false,
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Editor/EditorGrid.js on lines 183..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 50.

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

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

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

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

Refactorings

Further Reading

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

            if (partParameter.get("maxValue") !== null && partParameter.get("maxValue") !== "")
            {
                maxValue = partParameter.get("maxValue");
            }
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 620..623
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 625..628

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

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

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

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

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

Refactorings

Further Reading

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

            if (partParameter.get("minValue") !== null && partParameter.get("minValue") !== "")
            {
                minValue = partParameter.get("minValue");
            }
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 620..623
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 630..633

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

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

        var container = Ext.create("Ext.form.FieldContainer", {
            fieldLabel: i18n("Project Parts"),
            labelWidth: 110,
            layout: 'fit',
            flex: 1,
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectEditor.js on lines 69..75
src/PartKeepr/FrontendBundle/Resources/public/js/Components/ProjectRun/ProjectRunEditor.js on lines 70..76

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

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

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

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

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

Refactorings

Further Reading

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

        if (this.splitSearchTermSystemPreference !== null) {
            splitTerms = Boolean(PartKeepr.getApplication().getSystemPreference(this.splitSearchTermSystemPreference,
                this.splitSearchTermSystemPreferenceDefaults));
        }
src/PartKeepr/FrontendBundle/Resources/public/js/form/field/SearchField.js on lines 144..147

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

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

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

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

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

Refactorings

Further Reading

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

            if (partParameter.get("value") !== null && partParameter.get("value") !== "")
            {
                value = partParameter.get("value");
            }
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 625..628
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 630..633

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

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

        var container = Ext.create("Ext.form.FieldContainer", {
            fieldLabel: i18n("Project Parts"),
            labelWidth: 110,
            layout: 'fit',
            flex: 1,
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectEditor.js on lines 57..63
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectEditor.js on lines 69..75

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

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 onKernelView has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    public function onKernelView(GetResponseForControllerResultEvent $event)
    {
        $controllerResult = $event->getControllerResult();

        if ($controllerResult instanceof Response) {

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

        this.getSelectionModel().on("select",
            Ext.bind(function (rsm, r, i)
            {
                this.defaultButton.enable();
            }, this));
src/PartKeepr/FrontendBundle/Resources/public/js/Components/PartMeasurementUnit/PartMeasurementUnitGrid.js on lines 35..39

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

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

            }, {
                text: '<span class="web-icon flag_orange"></span>',
                dataIndex: "needsReview",
                width: 30,
                tooltip: i18n("Needs Review?"),
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js on lines 280..291

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

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.getSelectionModel().on("deselect",
            Ext.bind(function (rsm, r, i)
            {
                this.defaultButton.disable();
            }, this));
src/PartKeepr/FrontendBundle/Resources/public/js/Components/PartMeasurementUnit/PartMeasurementUnitGrid.js on lines 41..45

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

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

        var container2 = Ext.create("Ext.form.FieldContainer", {
            fieldLabel: i18n("Attachments"),
            labelWidth: 110,
            layout: 'fit',
            flex: 1,
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectEditor.js on lines 57..63
src/PartKeepr/FrontendBundle/Resources/public/js/Components/ProjectRun/ProjectRunEditor.js on lines 70..76

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

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

            }, {
                text: '<span class="web-icon bricks"></span>',
                dataIndex: "metaPart",
                width: 30,
                tooltip: i18n("Meta Part"),
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js on lines 269..280

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

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

        }, {
            xtype: 'checkbox',
            plugins: [{
                    ptype: 'preference',
                    preferenceKey: 'partkeepr.octopart.importReferenceDesigns',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 5..15
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 15..25
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 25..35
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 35..45
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 45..55
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 65..75

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

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

        }, {
            xtype: 'checkbox',
            plugins: [{
                    ptype: 'preference',
                    preferenceKey: 'partkeepr.octopart.importImages',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 5..15
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 15..25
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 25..35
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 35..45
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 45..55
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 55..65

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

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

        }, {
            xtype: 'checkbox',
            plugins: [{
                    ptype: 'preference',
                    preferenceKey: 'partkeepr.octopart.importParameters',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 5..15
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 25..35
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 35..45
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 45..55
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 55..65
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 65..75

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

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

        }, {
            xtype: 'checkbox',
            plugins: [{
                    ptype: 'preference',
                    preferenceKey: 'partkeepr.octopart.importComplianceDocuments',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 5..15
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 15..25
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 25..35
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 35..45
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 55..65
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 65..75

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

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

        {
            xtype: 'checkbox',
            plugins: [{
                    ptype: 'preference',
                    preferenceKey: 'partkeepr.octopart.importDistributors',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 15..25
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 25..35
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 35..45
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 45..55
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 55..65
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 65..75

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

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

        }, {
            xtype: 'checkbox',
            plugins: [{
                    ptype: 'preference',
                    preferenceKey: 'partkeepr.octopart.importCADModels',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 5..15
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 15..25
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 25..35
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 45..55
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 55..65
src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/OctoPartConfiguration.js on lines 65..75

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

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