partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

Function execute has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    execute: function ()
    {
        this.searchStore = Ext.create("Ext.data.Store", {
            model: 'PartKeepr.PartBundle.Entity.Part',
            autoLoad: false,

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

        initComponent: function ()
        {
            this.editor = Ext.create("PartKeepr.Components.Part.Editor.MetaPartEditor", {
                border: false,
                enableButtons: false

      Method intCreateUserAction has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function intCreateUserAction(Request $request)
          {
              if (!$this->ensureAuthKey($request)) {
                  return $this->getAuthKeyErrorResponse();
              }
      Severity: Minor
      Found in src/PartKeepr/SetupBundle/Controller/AdminUserSetupController.php - About 1 hr to fix

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

            onActivate: function ()
            {
                Ext.ComponentQuery.query('#nextBtn')[0].disable();
                this.retestButton.hide();
        
        
        Severity: Major
        Found in web/setup/js/Cards/AbstractTestCard.js and 1 other location - About 1 hr to fix
        web/setup/js/Cards/AuthKeyCard.js on lines 53..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 62.

        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

                for (i = 0; i < batchJobQueryFields.getCount(); i++) {
                    if (batchJobQueryFields.getAt(i).get("value") == "") {
                        valid = false;
                    }
                }
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/BatchJob/BatchJobExecutionWindow.js on lines 208..212

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

        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

                for (i = 0; i < batchJobUpdateFields.getCount(); i++) {
                    if (batchJobUpdateFields.getAt(i).get("value") == "") {
                        valid = false;
                    }
                }
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/BatchJob/BatchJobExecutionWindow.js on lines 200..204

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 62.

        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

            onActivate: function ()
            {
                Ext.ComponentQuery.query('#nextBtn')[0].disable();
                this.authKey.focus();
                this.onUpdateParameters();
        Severity: Major
        Found in web/setup/js/Cards/AuthKeyCard.js and 1 other location - About 1 hr to fix
        web/setup/js/Cards/AbstractTestCard.js on lines 129..135

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

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

            createPicker: function ()
            {
                var me = this,
                    picker,
                    pickerCfg = Ext.apply({

          Function append has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  FBB_proto.append = function(data/*, endings*/) {
                      var bb = this.data;
                      // decode data to a binary string
                      if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {
                          var
          Severity: Minor
          Found in src/PartKeepr/FrontendBundle/Resources/public/js/Util/Blob.js - About 1 hr to fix

            Function _doProcessBlock has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    _doProcessBlock: function (M, offset) {
                        // Shortcut
                        var H = this._hash.words;
            
                        // Working variables

              Method testPreferences has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function testPreferences()
                  {
                      $client = static::makeClient(true);
              
                      $request = [
              Severity: Minor
              Found in src/PartKeepr/AuthBundle/Tests/UserPreferenceTest.php - About 1 hr to fix

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

                        if (!node.parentNode.data.data.configuration.hasOwnProperty("manytoone")) {
                            node.parentNode.data.data.configuration.manytoone = {};
                        }
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 353..355
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 357..359

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

                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 (!node.parentNode.data.data.configuration.hasOwnProperty("onetomany")) {
                            node.parentNode.data.data.configuration.onetomany = {};
                        }
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 353..355
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 361..363

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

                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 (!node.parentNode.data.data.configuration.hasOwnProperty("fields")) {
                            node.parentNode.data.data.configuration.fields = {};
                        }
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 357..359
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 361..363

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

                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

                    removePartStockPrompt: function ()
                    {
                        var j = new PartKeepr.PartStockWindow({partUnitName: this.record.get("partUnitName")});
                        j.removeStock(this.removeStockHandler, this);
                    },
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartDisplay.js on lines 149..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 61.

                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

                    onCancelClick: function () {
                        if (this.fireEvent('cancel', this, this.getWizardData()) !== false) {
                            this.closable = true;
                            this.close();
                        }
                src/PartKeepr/FrontendBundle/Resources/public/js/Ext.ux.Wizard.js on lines 492..497

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

                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 (field.getValue())
                                        {
                                            this.port.disable();
                                            this.port.setValue(5432);
                                        } else
                Severity: Major
                Found in web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js and 1 other location - About 1 hr to fix
                web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 92..97

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

                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

                    onFinish: function () {
                        if (this.fireEvent('finish', this, this.getWizardData()) !== false) {
                            this.closable = true;
                            this.close();
                        }
                src/PartKeepr/FrontendBundle/Resources/public/js/Ext.ux.Wizard.js on lines 481..486

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

                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 (PartKeepr.getApplication().getUserPreference("partkeepr.partmanager.compactlayout", false) === true) {
                            this.compactLayout.setValue(true);
                        } else {
                            this.standardLayout.setValue(true);
                        }
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/StockConfiguration.js on lines 10..14

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

                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 (PartKeepr.getApplication().getUserPreference("partkeepr.inline-stock-change.confirm", true) === false) {
                                this.confirmInlineStockLevelChangesCheckbox.setValue(false);
                            } else {
                                this.confirmInlineStockLevelChangesCheckbox.setValue(true);
                            }
                src/PartKeepr/FrontendBundle/Resources/public/js/Components/UserPreferences/Preferences/DisplayConfiguration.js on lines 32..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 61.

                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