partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

Function getActionsByInput has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    getActionsByInput: function (input)
    {
        var i, actions = PartKeepr.getApplication().getSystemPreference("partkeepr.barcodeScanner.actions", []),
            foundActions = [];

    Method extractJSONFilters has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function extractJSONFilters(
            $data
        ) {
            $filter = new Filter();
    
    

      Function setupCards has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          setupCards: function ()
          {
              var cards = new Array();
      
              cards.push(Ext.create('Ext.form.Panel', {
      Severity: Minor
      Found in web/setup/js/SetupWizard.js - About 1 hr to fix

        Method getEntity has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function getEntity($entity)
            {
                $bTree = false;
        
                $parentClass = 'PartKeepr.data.HydraModel';

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

                  this.hostname = Ext.create("Ext.form.field.Text", {
                      fieldLabel: 'Database Hostname',
                      labelWidth: this.defaults.labelWidth,
                      value: PartKeeprSetup.getApplication().getSetupConfig().values.database_host
                  });
          Severity: Major
          Found in web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js and 5 other locations - About 1 hr to fix
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 29..33
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 37..41
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 54..58
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 39..43
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 56..60

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

          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.getSelectedCategory() !== null)
                  {
                      record.setCategory(this.getSelectedCategory());
                  } else
                  {
          src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 432..438

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

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

                  this.hostname = Ext.create("Ext.form.field.Text", {
                      fieldLabel: 'Database Hostname',
                      labelWidth: this.defaults.labelWidth,
                      value: PartKeeprSetup.getApplication().getSetupConfig().values.database_host
                  });
          Severity: Major
          Found in web/setup/js/Cards/DatabaseParametersCard.MySQL.js and 5 other locations - About 1 hr to fix
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 37..41
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 54..58
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 31..35
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 39..43
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 56..60

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

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

                  this.databaseName = Ext.create("Ext.form.field.Text", {
                      fieldLabel: 'Database Name',
                      labelWidth: this.defaults.labelWidth,
                      value: PartKeeprSetup.getApplication().getSetupConfig().values.database_name
                  });
          Severity: Major
          Found in web/setup/js/Cards/DatabaseParametersCard.MySQL.js and 5 other locations - About 1 hr to fix
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 29..33
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 37..41
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 31..35
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 39..43
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 56..60

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

          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.getSelectedCategory() !== null)
                  {
                      record.setCategory(this.getSelectedCategory());
                  } else
                  {
          src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsManager.js on lines 496..502

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

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

                  this.username = Ext.create("Ext.form.field.Text", {
                      fieldLabel: 'Database Username',
                      labelWidth: this.defaults.labelWidth,
                      value: PartKeeprSetup.getApplication().getSetupConfig().values.database_user
                  });
          Severity: Major
          Found in web/setup/js/Cards/DatabaseParametersCard.MySQL.js and 5 other locations - About 1 hr to fix
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 29..33
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 54..58
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 31..35
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 39..43
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 56..60

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

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

                  this.username = Ext.create("Ext.form.field.Text", {
                      fieldLabel: 'Database Username',
                      labelWidth: this.defaults.labelWidth,
                      value: PartKeeprSetup.getApplication().getSetupConfig().values.database_user
                  });
          Severity: Major
          Found in web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js and 5 other locations - About 1 hr to fix
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 29..33
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 37..41
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 54..58
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 31..35
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 56..60

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

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

                  this.databaseName = Ext.create("Ext.form.field.Text", {
                      fieldLabel: 'Database Name',
                      labelWidth: this.defaults.labelWidth,
                      value: PartKeeprSetup.getApplication().getSetupConfig().values.database_name
                  });
          Severity: Major
          Found in web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js and 5 other locations - About 1 hr to fix
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 29..33
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 37..41
          web/setup/js/Cards/DatabaseParametersCard.MySQL.js on lines 54..58
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 31..35
          web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js on lines 39..43

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

          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

                  Ext.applyIf(this.sideConfig, { region: sregion, width: 150, layout: 'fit', xtype: 'wizardheader', headerPosition: 'side', steps: this.cards.length, hidden: !(c.sideConfig) });
          src/PartKeepr/FrontendBundle/Resources/public/js/Ext.ux.Wizard.js on lines 159..159

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

          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

                  Ext.applyIf(this.headConfig, { region: hregion, height: 150, layout: 'fit', xtype: 'wizardheader', headerPosition: 'top', steps: this.cards.length, hidden: !(c.headConfig) });
          src/PartKeepr/FrontendBundle/Resources/public/js/Ext.ux.Wizard.js on lines 158..158

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

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

              keyHandler: function (field, e) {
                  var picker = this.getPicker(),
                      currentSelection, index;
                  switch (e.getKey()) {
                      case e.DOWN:

            Function Base has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                var Base = C_lib.Base = (function () {
                    function F() {}
            
                    return {
                        /**

              Function getCheapestDistributor has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  getCheapestDistributor: function (part)
                  {
                      var cheapestDistributor = null;
                      var currentPrice;
                      var activeDistributor;

                Method testTips has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function testTips()
                    {
                        $client = static::makeClient(true);
                
                        $tip = $this->fixtures->getReference('tipoftheday');
                Severity: Minor
                Found in src/PartKeepr/TipOfTheDayBundle/Tests/TipOfTheDayTest.php - About 1 hr to fix

                  Function extractData has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      extractData: function(root, readOptions) {
                  
                          var me = this,
                              entityType = readOptions && readOptions.model ? Ext.data.schema.Schema.lookupEntity(readOptions.model) : me.getModel(),
                              schema = entityType.schema,

                    Method testWebcamUploadAction has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function testWebcamUploadAction()
                        {
                            $client = static::makeClient(true);
                    
                            $file = __DIR__.'/Fixtures/files/uploadtest.png';
                      Severity
                      Category
                      Status
                      Source
                      Language