partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

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

    onAddMatchField: function ()
    {
        var excludeFields = [];

        for (var j = 0; j < this.store.getCount(); j++) {

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

        initComponent: function () {
    
            this.cardTitle = this.title;
            this.title = (this.showTitle ? '<span style="' + this.titleStyle + '" class="' + this.titleCls + '" >' + this.title + '</span>' : '');
    
    

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

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

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

                        if (!node.parentNode.data.data.configuration.fields.hasOwnProperty(node.data.text)) {
                            node.parentNode.data.data.configuration.fields[node.data.text] = {};
                        }
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 367..369
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 383..385

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

        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.manytoone.hasOwnProperty(node.data.text)) {
                            node.parentNode.data.data.configuration.manytoone[node.data.text] = {};
                        }
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 383..385
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 389..391

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

        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.onetomany.hasOwnProperty(node.data.text)) {
                            node.parentNode.data.data.configuration.onetomany[node.data.text] = {};
                        }
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 367..369
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Importer/Importer.js on lines 389..391

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

        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 (var i = 0; i < root.menu.length; i++) {
                    if (root.menu[i].text === item.text) {
                        Ext.applyIf(root.menu[i], item);
                        foundItem = i;
                    }
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Preferences/Tree.js on lines 47..52

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

        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 (var i = 0; i < root.children.length; i++) {
                    if (root.children[i].text === item.text) {
                        Ext.applyIf(root.children[i], item);
                        foundItem = i;
                    }
        src/PartKeepr/FrontendBundle/Resources/public/js/Components/MenuBar.js on lines 24..29

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

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

            initComponent: function ()
            {
        
                this.fieldSelector = Ext.create("PartKeepr.Components.Widgets.FieldSelector", {
                    height: 150,

          Function defineColumns has 62 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              defineColumns: function () {
                  this.columns = [
                      {
                          header: "",
                          xtype: 'actioncolumn',

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

                initComponent: function ()
                {
                    /**
                     * Create the template
                     */

              Function getAssociatedData has 62 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  getAssociatedData: function (result, options)
                  {
                      var me = this,
                          associations = me.associations,
                          deep, i, item, items, itemData, length,
              Severity: Major
              Found in src/PartKeepr/FrontendBundle/Resources/public/js/Data/HydraModel.js - About 2 hrs to fix

                Method intCacheWarmupAction has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public function intCacheWarmupAction(Request $request)
                    {
                        if (!$this->ensureAuthKey($request)) {
                            return $this->getAuthKeyErrorResponse();
                        }
                Severity: Major
                Found in src/PartKeepr/SetupBundle/Controller/CacheWarmupSetupController.php - About 2 hrs to fix

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

                          {
                              xtype: 'fieldcontainer',
                              fieldLabel: i18n("Field"),
                              layout: 'hbox',
                              items: [
                  src/PartKeepr/FrontendBundle/Resources/public/js/Components/BatchJob/BatchJobUpdateExpression.js on lines 27..46

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 84.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      addParameterFilter: function () {
                          this.addFilterWindow = Ext.create("PartKeepr.Components.Widgets.PartParameterSearchWindow", {
                  
                              sourceModel: this.getStore().getModel(),
                              listeners: {
                  src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/PagingToolbar.js on lines 64..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 84.

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

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

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

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

                  Refactorings

                  Further Reading

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

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

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 84.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      onAddFilterClick: function ()
                      {
                          this.addFilterWindow = Ext.create("PartKeepr.Widgets.FilterExpressionWindow", {
                  
                              sourceModel: this.getStore().getModel(),
                  src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartsGrid.js on lines 387..398

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 84.

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

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

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

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

                  Refactorings

                  Further Reading

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

                          {
                              xtype: 'fieldcontainer',
                              fieldLabel: i18n("Field"),
                              layout: 'hbox',
                              items: [
                  src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/FilterExpression.js on lines 24..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 84.

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

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

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

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

                  Refactorings

                  Further Reading

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

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

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 84.

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

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

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

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

                  Refactorings

                  Further Reading

                  Function formatParameter has 61 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          formatParameter: function (partParameter) {
                              var minSiPrefix = "", siPrefix = "", maxSiPrefix = "", unit = "", minValue = "", maxValue = "", value = "",
                                  minMaxCombined = "";
                  
                              if (partParameter.get("valueType") === "string")
                    Severity
                    Category
                    Status
                    Source
                    Language