partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

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

Ext.define("PartKeepr.PartUnitComboBox",{
    extend:"PartKeepr.ReloadableComboBox",
    alias: 'widget.PartUnitComboBox',
    initComponent: function () {
        this.store = PartKeepr.getApplication().getPartUnitStore();
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/FootprintComboBox.js on lines 1..8
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/ManufacturerComboBox.js on lines 1..8

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

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

            }, {
                width: 370,
                height: 250,
                xtype: 'fieldcontainer',
                items: {
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Footprint/FootprintEditor.js on lines 45..61

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

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

Ext.define("PartKeepr.FootprintComboBox",{
    extend:"PartKeepr.ReloadableComboBox",
    alias: 'widget.FootprintComboBox',
    initComponent: function () {
        this.store = PartKeepr.getApplication().getFootprintStore();
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/ManufacturerComboBox.js on lines 1..8
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/PartUnitComboBox.js on lines 1..8

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

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

Ext.define("PartKeepr.ManufacturerComboBox",{
    extend:"PartKeepr.ReloadableComboBox",
    alias: 'widget.ManufacturerComboBox',
    initComponent: function () {
        this.store = PartKeepr.getApplication().getManufacturerStore();
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/FootprintComboBox.js on lines 1..8
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/PartUnitComboBox.js on lines 1..8

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

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

    initComponent: function ()
    {
        this.oldPassword = Ext.create("Ext.form.field.Text", {
            inputType: "password",
            name: 'password',

    Function onKeyPress has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        onKeyPress: function (e)
        {
            var hotKeyPressed = false;
    
            var hotKey = PartKeepr.getApplication().getSystemPreference("partkeepr.barcodeScanner.key", "");

      Function confirmStockChange has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          confirmStockChange: function (e)
          {
              var mode = this.getStockChangeMode(e.value);
              var value = Math.abs(parseInt(e.value));
              var confirmText = "";

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

            initComponent: function ()
            {
                var i, rendererDef, rendererClass;
        
                if (this.$className !== "Ext.grid.column.Column") {

          Method testExistingUsers has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function testExistingUsers()
              {
                  $this->markTestSkipped('Setup tests requires setup refactoring, skipping');
                  $authKey = $this->generateAndGetAuthKey();
                  $configuration = $this->getConfiguration($authKey);
          Severity: Minor
          Found in src/PartKeepr/SetupBundle/Tests/ExistingUsersSetupTest.php - About 1 hr to fix

            Function onUpdateParameters has 41 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                onUpdateParameters: function ()
                {
                    if (this.initial)
                    {
                        return;
            Severity: Minor
            Found in web/setup/js/Cards/DatabaseParametersCard.PostgreSQL.js - About 1 hr to fix

              Function getFieldType has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  getFieldType: function (fieldName)
                  {
                      var ret = null, role, tmp, i;
              
                      for (i=0;i<this.fields.length;i++) {
              Severity: Minor
              Found in src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraModel.js - About 1 hr to fix

                Method getRenderParameters has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function getRenderParameters()
                    {
                        if ($this->getParameter('partkeepr.maintenance') !== false) {
                            $renderParams['maintenanceTitle'] = $this->getParameter('partkeepr.maintenance.title');
                            $renderParams['maintenanceMessage'] = $this->getParameter('partkeepr.maintenance.message');
                Severity: Minor
                Found in src/PartKeepr/FrontendBundle/Controller/IndexController.php - About 1 hr to fix

                  Function decode_base64 has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  bCrypt.prototype.decode_base64 = function(s, maxolen) {
                      var off = 0;
                      var slen = s.length;
                      var olen = 0;
                      var rs = [];

                    Function doThemes has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        doThemes: function () {
                            var time = Ext.perf.getTimestamp(),
                                maskedPanel;
                    
                            var items = [this.getBasicPanel(),

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

                          initComponent: function ()
                          {
                              this.showDescriptionsCheckbox = Ext.create("Ext.form.field.Checkbox", {
                                  labelWidth: 120,
                                  hideEmptyLabel: false,

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

                                            distributor.save({
                                                success: function ()
                                                {
                                                    PartKeepr.getApplication().getDistributorStore().load({
                                                        callback: this.applyData,
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js on lines 60..70
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js on lines 92..102

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

                        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

                            onChange: function ()
                            {
                                this.onImportBehaviourChange();
                        
                        
                        
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/ImporterOneToManyConfiguration.js on lines 49..57

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

                        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

                                    manufacturer.save({
                                        success: function ()
                                        {
                                            PartKeepr.getApplication().getManufacturerStore().load({
                                                callback: this.applyData,
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js on lines 92..102
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js on lines 122..132

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

                        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

                            onChange: function ()
                            {
                                this.onImportBehaviourChange();
                                this.fireEvent("configChanged");
                        
                        
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/ImporterManyToOneConfiguration.js on lines 214..223

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

                        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

                                                unit.save({
                                                    success: function ()
                                                    {
                                                        PartKeepr.getApplication().getUnitStore().load({
                                                            callback: this.applyData,
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js on lines 60..70
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/OctoPart/DataApplicator.js on lines 122..132

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

                        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