@@ -25,19 +25,19 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | public function provideBusinessLayerDependencies(Container $container) |
| 27 | 27 | { |
| 28 | - $container[self::CHECKOUT_PRE_CONDITIONS] = function (Container $container) { |
|
| 28 | + $container[self::CHECKOUT_PRE_CONDITIONS] = function(Container $container) { |
|
| 29 | 29 | return $this->getCheckoutPreConditions($container); |
| 30 | 30 | }; |
| 31 | 31 | |
| 32 | - $container[self::CHECKOUT_ORDER_SAVERS] = function (Container $container) { |
|
| 32 | + $container[self::CHECKOUT_ORDER_SAVERS] = function(Container $container) { |
|
| 33 | 33 | return $this->getCheckoutOrderSavers($container); |
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | - $container[self::CHECKOUT_POST_HOOKS] = function (Container $container) { |
|
| 36 | + $container[self::CHECKOUT_POST_HOOKS] = function(Container $container) { |
|
| 37 | 37 | return $this->getCheckoutPostHooks($container); |
| 38 | 38 | }; |
| 39 | 39 | |
| 40 | - $container[static::CHECKOUT_PRE_SAVE_HOOKS] = function (Container $container) { |
|
| 40 | + $container[static::CHECKOUT_PRE_SAVE_HOOKS] = function(Container $container) { |
|
| 41 | 41 | return $this->getCheckoutPreSaveHooks($container); |
| 42 | 42 | }; |
| 43 | 43 | |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | |
| 24 | 24 | use _generated\CheckoutModelTesterActions; |
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Define custom actions here |
|
| 28 | - */ |
|
| 26 | + /** |
|
| 27 | + * Define custom actions here |
|
| 28 | + */ |
|
| 29 | 29 | |
| 30 | 30 | } |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | |
| 24 | 24 | use _generated\CheckoutBusinessTesterActions; |
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Define custom actions here |
|
| 28 | - */ |
|
| 26 | + /** |
|
| 27 | + * Define custom actions here |
|
| 28 | + */ |
|
| 29 | 29 | |
| 30 | 30 | } |
@@ -27,15 +27,15 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function provideServiceLayerDependencies(Container $container) |
| 29 | 29 | { |
| 30 | - $container[static::KV_STORAGE] = function (Container $container) { |
|
| 30 | + $container[static::KV_STORAGE] = function(Container $container) { |
|
| 31 | 31 | return new ProductToStorageBridge($container->getLocator()->storage()->client()); |
| 32 | 32 | }; |
| 33 | 33 | |
| 34 | - $container[static::CLIENT_LOCALE] = function (Container $container) { |
|
| 34 | + $container[static::CLIENT_LOCALE] = function(Container $container) { |
|
| 35 | 35 | return new ProductToLocaleBridge($container->getLocator()->locale()->client()); |
| 36 | 36 | }; |
| 37 | 37 | |
| 38 | - $container[static::SERVICE_ENCODING] = function (Container $container) { |
|
| 38 | + $container[static::SERVICE_ENCODING] = function(Container $container) { |
|
| 39 | 39 | return new ProductToUtilEncodingBridge($container->getLocator()->utilEncoding()->service()); |
| 40 | 40 | }; |
| 41 | 41 | |
@@ -631,9 +631,9 @@ |
||
| 631 | 631 | */ |
| 632 | 632 | public function activateProductConcrete($idProductConcrete) |
| 633 | 633 | { |
| 634 | - $this->getFactory() |
|
| 635 | - ->createProductConcreteActivator() |
|
| 636 | - ->activateProductConcrete($idProductConcrete); |
|
| 634 | + $this->getFactory() |
|
| 635 | + ->createProductConcreteActivator() |
|
| 636 | + ->activateProductConcrete($idProductConcrete); |
|
| 637 | 637 | } |
| 638 | 638 | |
| 639 | 639 | /** |
@@ -49,67 +49,67 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | public function provideBusinessLayerDependencies(Container $container) |
| 51 | 51 | { |
| 52 | - $container[self::FACADE_LOCALE] = function (Container $container) { |
|
| 52 | + $container[self::FACADE_LOCALE] = function(Container $container) { |
|
| 53 | 53 | return new ProductToLocaleBridge($container->getLocator()->locale()->facade()); |
| 54 | 54 | }; |
| 55 | 55 | |
| 56 | - $container[self::FACADE_URL] = function (Container $container) { |
|
| 56 | + $container[self::FACADE_URL] = function(Container $container) { |
|
| 57 | 57 | return new ProductToUrlBridge($container->getLocator()->url()->facade()); |
| 58 | 58 | }; |
| 59 | 59 | |
| 60 | - $container[self::FACADE_TOUCH] = function (Container $container) { |
|
| 60 | + $container[self::FACADE_TOUCH] = function(Container $container) { |
|
| 61 | 61 | return new ProductToTouchBridge($container->getLocator()->touch()->facade()); |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | - $container[self::SERVICE_UTIL_TEXT] = function (Container $container) { |
|
| 64 | + $container[self::SERVICE_UTIL_TEXT] = function(Container $container) { |
|
| 65 | 65 | return new ProductToUtilTextBridge($container->getLocator()->utilText()->service()); |
| 66 | 66 | }; |
| 67 | 67 | |
| 68 | - $container[self::SERVICE_UTIL_ENCODING] = function (Container $container) { |
|
| 68 | + $container[self::SERVICE_UTIL_ENCODING] = function(Container $container) { |
|
| 69 | 69 | return new ProductToUtilEncodingBridge($container->getLocator()->utilEncoding()->service()); |
| 70 | 70 | }; |
| 71 | 71 | |
| 72 | - $container[self::FACADE_EVENT] = function (Container $container) { |
|
| 72 | + $container[self::FACADE_EVENT] = function(Container $container) { |
|
| 73 | 73 | return new ProductToEventBridge($container->getLocator()->event()->facade()); |
| 74 | 74 | }; |
| 75 | 75 | |
| 76 | - $container[self::PRODUCT_ABSTRACT_PLUGINS_BEFORE_CREATE] = function (Container $container) { |
|
| 76 | + $container[self::PRODUCT_ABSTRACT_PLUGINS_BEFORE_CREATE] = function(Container $container) { |
|
| 77 | 77 | return $this->getProductAbstractBeforeCreatePlugins($container); |
| 78 | 78 | }; |
| 79 | 79 | |
| 80 | - $container[self::PRODUCT_ABSTRACT_PLUGINS_AFTER_CREATE] = function (Container $container) { |
|
| 80 | + $container[self::PRODUCT_ABSTRACT_PLUGINS_AFTER_CREATE] = function(Container $container) { |
|
| 81 | 81 | return $this->getProductAbstractAfterCreatePlugins($container); |
| 82 | 82 | }; |
| 83 | 83 | |
| 84 | - $container[self::PRODUCT_ABSTRACT_PLUGINS_READ] = function (Container $container) { |
|
| 84 | + $container[self::PRODUCT_ABSTRACT_PLUGINS_READ] = function(Container $container) { |
|
| 85 | 85 | return $this->getProductAbstractReadPlugins($container); |
| 86 | 86 | }; |
| 87 | 87 | |
| 88 | - $container[self::PRODUCT_ABSTRACT_PLUGINS_BEFORE_UPDATE] = function (Container $container) { |
|
| 88 | + $container[self::PRODUCT_ABSTRACT_PLUGINS_BEFORE_UPDATE] = function(Container $container) { |
|
| 89 | 89 | return $this->getProductAbstractBeforeUpdatePlugins($container); |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | - $container[self::PRODUCT_ABSTRACT_PLUGINS_AFTER_UPDATE] = function (Container $container) { |
|
| 92 | + $container[self::PRODUCT_ABSTRACT_PLUGINS_AFTER_UPDATE] = function(Container $container) { |
|
| 93 | 93 | return $this->getProductAbstractAfterUpdatePlugins($container); |
| 94 | 94 | }; |
| 95 | 95 | |
| 96 | - $container[self::PRODUCT_CONCRETE_PLUGINS_BEFORE_CREATE] = function (Container $container) { |
|
| 96 | + $container[self::PRODUCT_CONCRETE_PLUGINS_BEFORE_CREATE] = function(Container $container) { |
|
| 97 | 97 | return $this->getProductConcreteBeforeCreatePlugins($container); |
| 98 | 98 | }; |
| 99 | 99 | |
| 100 | - $container[self::PRODUCT_CONCRETE_PLUGINS_AFTER_CREATE] = function (Container $container) { |
|
| 100 | + $container[self::PRODUCT_CONCRETE_PLUGINS_AFTER_CREATE] = function(Container $container) { |
|
| 101 | 101 | return $this->getProductConcreteAfterCreatePlugins($container); |
| 102 | 102 | }; |
| 103 | 103 | |
| 104 | - $container[self::PRODUCT_CONCRETE_PLUGINS_READ] = function (Container $container) { |
|
| 104 | + $container[self::PRODUCT_CONCRETE_PLUGINS_READ] = function(Container $container) { |
|
| 105 | 105 | return $this->getProductConcreteReadPlugins($container); |
| 106 | 106 | }; |
| 107 | 107 | |
| 108 | - $container[self::PRODUCT_CONCRETE_PLUGINS_BEFORE_UPDATE] = function (Container $container) { |
|
| 108 | + $container[self::PRODUCT_CONCRETE_PLUGINS_BEFORE_UPDATE] = function(Container $container) { |
|
| 109 | 109 | return $this->getProductConcreteBeforeUpdatePlugins($container); |
| 110 | 110 | }; |
| 111 | 111 | |
| 112 | - $container[self::PRODUCT_CONCRETE_PLUGINS_AFTER_UPDATE] = function (Container $container) { |
|
| 112 | + $container[self::PRODUCT_CONCRETE_PLUGINS_AFTER_UPDATE] = function(Container $container) { |
|
| 113 | 113 | return $this->getProductConcreteAfterUpdatePlugins($container); |
| 114 | 114 | }; |
| 115 | 115 | |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function providePersistenceLayerDependencies(Container $container) |
| 135 | 135 | { |
| 136 | - $container[self::QUERY_CONTAINER_URL] = function (Container $container) { |
|
| 136 | + $container[self::QUERY_CONTAINER_URL] = function(Container $container) { |
|
| 137 | 137 | return new ProductToUrlQueryContainerBridge($container->getLocator()->url()->queryContainer()); |
| 138 | 138 | }; |
| 139 | 139 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | $productConcreteTransfer->getIdProductConcrete() |
| 45 | 45 | )); |
| 46 | 46 | |
| 47 | - $this->getDataCleanupHelper()->_addCleanup(function () use ($productConcreteTransfer) { |
|
| 47 | + $this->getDataCleanupHelper()->_addCleanup(function() use ($productConcreteTransfer) { |
|
| 48 | 48 | $this->cleanupProductConcrete($productConcreteTransfer->getIdProductConcrete()); |
| 49 | 49 | $this->cleanupProductAbstract($productConcreteTransfer->getFkProductAbstract()); |
| 50 | 50 | }); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $abstractProductId |
| 70 | 70 | )); |
| 71 | 71 | |
| 72 | - $this->getDataCleanupHelper()->_addCleanup(function () use ($productAbstractTransfer) { |
|
| 72 | + $this->getDataCleanupHelper()->_addCleanup(function() use ($productAbstractTransfer) { |
|
| 73 | 73 | $this->cleanupProductAbstract($productAbstractTransfer->getIdProductAbstract()); |
| 74 | 74 | }); |
| 75 | 75 | |
@@ -23,8 +23,8 @@ |
||
| 23 | 23 | |
| 24 | 24 | use _generated\ProductBusinessTesterActions; |
| 25 | 25 | |
| 26 | - /** |
|
| 27 | - * Define custom actions here |
|
| 28 | - */ |
|
| 26 | + /** |
|
| 27 | + * Define custom actions here |
|
| 28 | + */ |
|
| 29 | 29 | |
| 30 | 30 | } |
@@ -45,16 +45,16 @@ |
||
| 45 | 45 | |
| 46 | 46 | $messages = new ArrayObject(); |
| 47 | 47 | foreach ($cartChangeTransfer->getItems() as $itemTransfer) { |
| 48 | - $currentItemQuantity = $this->calculateCurrentCartQuantityForGivenSku( |
|
| 49 | - $cartChangeTransfer, |
|
| 50 | - $itemTransfer->getSku() |
|
| 51 | - ); |
|
| 52 | - $currentItemQuantity += $itemTransfer->getQuantity(); |
|
| 53 | - |
|
| 54 | - $isSellable = $this->availabilityFacade->isProductSellable( |
|
| 55 | - $itemTransfer->getSku(), |
|
| 56 | - $currentItemQuantity |
|
| 57 | - ); |
|
| 48 | + $currentItemQuantity = $this->calculateCurrentCartQuantityForGivenSku( |
|
| 49 | + $cartChangeTransfer, |
|
| 50 | + $itemTransfer->getSku() |
|
| 51 | + ); |
|
| 52 | + $currentItemQuantity += $itemTransfer->getQuantity(); |
|
| 53 | + |
|
| 54 | + $isSellable = $this->availabilityFacade->isProductSellable( |
|
| 55 | + $itemTransfer->getSku(), |
|
| 56 | + $currentItemQuantity |
|
| 57 | + ); |
|
| 58 | 58 | |
| 59 | 59 | if (!$isSellable) { |
| 60 | 60 | $stock = $this->availabilityFacade->calculateStockForProduct($itemTransfer->getSku()); |