partkeepr/PartKeepr

View on GitHub

Showing 922 of 922 total issues

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

        this.viewButton = Ext.create("Ext.button.Button", {
            text: i18n('View Part'),
            disabled: true,
            itemId: 'view',
            scope: this,
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/Editor/PartParameterGrid.js on lines 21..28
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Project/ProjectPartGrid.js on lines 125..132
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/AttachmentGrid.js on lines 29..36
src/PartKeepr/FrontendBundle/Resources/public/js/Components/Widgets/UserPreferenceGrid.js on lines 25..32

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

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

    onCategoryClick: function (tree, record)
    {
        var filter = Ext.create("PartKeepr.util.Filter", {
            property: 'category',
            operator: 'IN',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/StorageLocation/StorageLocationNavigation.js on lines 96..105

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

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

                    items: [
                        {
                            disabled: true,
                            itemId: "valueField",
                            xtype: 'textfield',
src/PartKeepr/FrontendBundle/Resources/public/js/Components/BatchJob/BatchJobUpdateExpression.js on lines 54..68

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

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

    createPicker: function() {
        var me = this,
            picker = new Ext.tree.Panel({
                baseCls: Ext.baseCSSPrefix + 'boundlist',
                shrinkWrapDock: 2,

    Function reconfigureColumns has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        reconfigureColumns: function (columnsStore)
        {
            var columns = [
                {
                    text: i18n("Match field"),

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

          execute: function ()
          {
              var subFilters = [];
              var searchValue;
      
      

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

            initComponent: function ()
            {
                this.connectionButton = new PartKeepr.ConnectionButton();
                this.connectionButton.on("click", this.onConnectionButtonClick, this);
                this.timeDisplay = Ext.create("PartKeepr.TimeDisplay");

          Function convertTraceToTree has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              convertTraceToTree: function (node, prefixText)
              {
                  if (!Ext.isDefined(prefixText)) {
                      prefixText = typeof node;
                  }

            Function getColumnMenu has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                getColumnMenu: function (headerContainer)
                {
                    var menuItems = [],
                        i = 0,
                        item,

              Function read has 29 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  read: function(response, readOptions) {
                      var data, result, responseText;
              
                      if (response) {
                          responseText = response.responseText;

                Method intTestDBVersionAction has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Method getPartyByQuery has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public function getPartyByQuery($q, $startpage = 1)
                      {
                          $client = new Client();
                  
                          $request = $client->createRequest('POST', self::OCTOPART_ENDPOINT);
                  Severity: Minor
                  Found in src/PartKeepr/OctoPartBundle/Services/OctoPartService.php - About 1 hr to fix

                    Method getRelease has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function getRelease()
                        {
                            switch (strtolower($this->getPlatform())) {
                                case 'freebsd':
                                    /*
                    Severity: Minor
                    Found in src/PartKeepr/CoreBundle/System/OperatingSystem.php - About 1 hr to fix

                      Method createReportAction has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function createReportAction(Request $request)
                          {
                              /**
                               * @var ResourceInterface
                               */
                      Severity: Minor
                      Found in src/PartKeepr/ProjectBundle/Controller/ProjectReportController.php - About 1 hr to fix

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

                                this.toolbarEditButton = Ext.create("Ext.button.Button", {
                                    tooltip: i18n("Edit Category"),
                                    handler: Ext.bind(this.showCategoryEditDialog, this),
                                    iconCls: 'web-icon folder_edit',
                                    disabled: true
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js on lines 125..130
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js on lines 132..137

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

                        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

                            statics: {
                                iconCls: 'web-icon chart_bar',
                                title: i18n('Chart'),
                                closable: true,
                                menuPath: [{text: i18n("View")}, {text: i18n("Statistics"), iconCls: "web-icon chart_bar"}]
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Statistics/SummaryStatisticsPanel.js on lines 101..106
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/ThemeTester/ThemeTester.js on lines 1015..1024

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

                        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("Quantity"),
                                            layout: 'hbox',
                                            items: [
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/PartStockWindow.js on lines 103..115

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

                        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("Quantity"),
                                            layout: 'hbox',
                                            items: [
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Part/AddRemoveStockWindow.js on lines 80..92

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

                        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

                                this.toolbarDeleteButton = Ext.create("Ext.button.Button", {
                                    tooltip: i18n("Delete Category"),
                                    handler: Ext.bind(this.confirmCategoryDelete, this),
                                    iconCls: 'web-icon folder_delete',
                                    disabled: true
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js on lines 125..130
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/CategoryEditor/CategoryEditorTree.js on lines 139..144

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

                        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

                            statics: {
                                iconCls: 'fugue-icon ui-combo-box-blue',
                                title: i18n('Theme Tester'),
                                closable: true,
                                menuPath: [{text: i18n("View")},
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Statistics/StatisticsChartPanel.js on lines 83..88
                        src/PartKeepr/FrontendBundle/Resources/public/js/Components/Statistics/SummaryStatisticsPanel.js on lines 101..106

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

                        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