partkeepr/PartKeepr

View on GitHub

Showing 481 of 922 total issues

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

    initComponent: function ()
    {

        this.fieldSelector = Ext.create("PartKeepr.Components.Widgets.FieldSelector", {
            height: 300,

    Function createGlobalStores has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        createGlobalStores: function ()
        {
            this.footprintStore = Ext.create("Ext.data.Store",
                {
                    model: 'PartKeepr.FootprintBundle.Entity.Footprint',

      Function crypt_raw has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      bCrypt.prototype.crypt_raw = function(password, salt, log_rounds, cdata, callback, progress) {
          var rounds;
          var j;
          var clen = cdata.length;
          var one_percent;

        Function getBorderLayout has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            getBorderLayout: function () {
                var padding = {
                    classic: 5,
                    partkeepr: 5,
                    gray: 5,

          Method massRemoveStockAction has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function massRemoveStockAction(Request $request)
              {
                  /**
                   * @var IriConverter
                   */
          Severity: Minor
          Found in src/PartKeepr/PartBundle/Controller/PartController.php - About 1 hr to fix

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

                initComponent: function ()
                {
                    var gridConfig = {
                        xtype: 'partkeepr.StorageLocationGrid',
                        resizable: true,

              Method import has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public function import($row, $obj = null)
                  {
                      $descriptions = [];
                      switch ($this->importBehaviour) {
                          case self::IMPORTBEHAVIOUR_ALWAYSSETTO:
              Severity: Minor
              Found in src/PartKeepr/ImportBundle/Configuration/ManyToOneConfiguration.php - About 1 hr to fix

                Method getLegacyConfig has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function getLegacyConfig()
                    {
                        $config = [];
                
                        $legacyConfig = $this->get('partkeepr.setup.config_service')->legacyConfigParser();

                  Function onFieldChange has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      onFieldChange: function (selectionModel, selected)
                      {
                          if (selected.length == 1) {
                              if (selected[0].data.data.type == "field") {
                                  this.down("#configurationCards").setActiveItem(this.down("#importerFieldConfiguration"));

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function getCheapestDistributor has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

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

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function save has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      save: function (options) {
                          options = Ext.apply({}, options);
                  
                          var me = this,
                              phantom = me.phantom,

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function extractData has a Cognitive Complexity of 15 (exceeds 5 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,

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function getFilterExpression has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private function getFilterExpression(QueryBuilder $queryBuilder, Filter $filter)
                      {
                          if ($filter->hasSubFilters()) {
                              $subFilterExpressions = [];
                  
                  

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function recomputeStockLevels has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function recomputeStockLevels()
                      {
                          $currentStock = 0;
                          $avgPrice = 0;
                  
                  
                  Severity: Minor
                  Found in src/PartKeepr/PartBundle/Entity/Part.php - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function onFlush has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function onFlush(OnFlushEventArgs $eventArgs)
                      {
                          $entityManager = $eventArgs->getEntityManager();
                          $uow = $entityManager->getUnitOfWork();
                  
                  
                  Severity: Minor
                  Found in src/PartKeepr/PartBundle/Listeners/StockLevelListener.php - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

                  Function massRemoveStockAction has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public function massRemoveStockAction(Request $request)
                      {
                          /**
                           * @var IriConverter
                           */
                  Severity: Minor
                  Found in src/PartKeepr/PartBundle/Controller/PartController.php - About 1 hr to fix

                  Cognitive Complexity

                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                  A method's cognitive complexity is based on a few simple rules:

                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                  • Code is considered more complex for each "break in the linear flow of the code"
                  • Code is considered more complex when "flow breaking structures are nested"

                  Further reading

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

                      initComponent: function ()
                      {
                  
                          this.loginField = Ext.ComponentMgr.create({
                              xtype: 'textfield',

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

                        initComponent: function ()
                        {
                            var modelFieldSelector = Ext.create({
                                xtype: 'modelFieldSelector',
                                border: false,

                      Function applyColumnConfigurationFromGrid has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          applyColumnConfigurationFromGrid: function ()
                          {
                              var columns = this.grid.getColumns();
                              var i, j;
                              var columnRecord;

                        Function exportGrid has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            exportGrid: function ()
                            {
                                var columns = this.gridPanel.getColumns();
                        
                                var store = this.gridPanel.getStore();
                          Severity
                          Category
                          Status
                          Source
                          Language