@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | protected function fillNullValues($hasQueryParameter, array $mca) |
| 44 | 44 | { |
| 45 | - $mapCallback = function ($value) use ($hasQueryParameter) { |
|
| 45 | + $mapCallback = function($value) use ($hasQueryParameter) { |
|
| 46 | 46 | return ($value) ?: (($hasQueryParameter) ? 'index' : null); |
| 47 | 47 | }; |
| 48 | 48 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | protected function removeNullValues(array $mca) |
| 59 | 59 | { |
| 60 | - $filterCallback = function ($value) { |
|
| 60 | + $filterCallback = function($value) { |
|
| 61 | 61 | return $value !== null; |
| 62 | 62 | }; |
| 63 | 63 | |
@@ -221,8 +221,8 @@ |
||
| 221 | 221 | public function queryDiscountName($discountName) |
| 222 | 222 | { |
| 223 | 223 | return $this->getFactory() |
| 224 | - ->createDiscountQuery() |
|
| 225 | - ->filterByDisplayName($discountName); |
|
| 224 | + ->createDiscountQuery() |
|
| 225 | + ->filterByDisplayName($discountName); |
|
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | /** |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | $discountEntity = $this->createDiscountEntity(); |
| 65 | 65 | $this->hydrateDiscountEntity($discountConfiguratorTransfer, $discountEntity); |
| 66 | 66 | |
| 67 | - $this->handleDatabaseTransaction(function () use ($discountEntity, $discountConfiguratorTransfer) { |
|
| 67 | + $this->handleDatabaseTransaction(function() use ($discountEntity, $discountConfiguratorTransfer) { |
|
| 68 | 68 | $this->executeSaveDiscountTransaction($discountEntity, $discountConfiguratorTransfer); |
| 69 | 69 | }); |
| 70 | 70 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | ); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - $affectedRows = $this->handleDatabaseTransaction(function () use ($discountEntity, $discountConfiguratorTransfer) { |
|
| 125 | + $affectedRows = $this->handleDatabaseTransaction(function() use ($discountEntity, $discountConfiguratorTransfer) { |
|
| 126 | 126 | return $this->executeUpdateDiscountTransaction($discountEntity, $discountConfiguratorTransfer); |
| 127 | 127 | }); |
| 128 | 128 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | return array_uintersect( |
| 46 | 46 | $lefCollectedItems, |
| 47 | 47 | $rightCollectedItems, |
| 48 | - function (DiscountableItemTransfer $collected, DiscountableItemTransfer $toCollect) { |
|
| 48 | + function(DiscountableItemTransfer $collected, DiscountableItemTransfer $toCollect) { |
|
| 49 | 49 | return strcmp(spl_object_hash($collected->getOriginalItemCalculatedDiscounts()), spl_object_hash($toCollect->getOriginalItemCalculatedDiscounts())); |
| 50 | 50 | } |
| 51 | 51 | ); |
@@ -14,9 +14,9 @@ discard block |
||
| 14 | 14 | class DecisionRuleContext implements DecisionRuleSpecificationInterface |
| 15 | 15 | { |
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * @var \Spryker\Zed\Discount\Dependency\Plugin\DecisionRulePluginInterface |
|
| 19 | - */ |
|
| 17 | + /** |
|
| 18 | + * @var \Spryker\Zed\Discount\Dependency\Plugin\DecisionRulePluginInterface |
|
| 19 | + */ |
|
| 20 | 20 | protected $rulePlugin; |
| 21 | 21 | |
| 22 | 22 | /** |
@@ -24,31 +24,31 @@ discard block |
||
| 24 | 24 | */ |
| 25 | 25 | protected $clauseTransfer; |
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * @param \Spryker\Zed\Discount\Dependency\Plugin\DecisionRulePluginInterface $rulePlugin |
|
| 29 | - * @param \Generated\Shared\Transfer\ClauseTransfer $clauseTransfer |
|
| 30 | - */ |
|
| 27 | + /** |
|
| 28 | + * @param \Spryker\Zed\Discount\Dependency\Plugin\DecisionRulePluginInterface $rulePlugin |
|
| 29 | + * @param \Generated\Shared\Transfer\ClauseTransfer $clauseTransfer |
|
| 30 | + */ |
|
| 31 | 31 | public function __construct(DecisionRulePluginInterface $rulePlugin, ClauseTransfer $clauseTransfer) |
| 32 | 32 | { |
| 33 | 33 | $this->rulePlugin = $rulePlugin; |
| 34 | 34 | $this->clauseTransfer = $clauseTransfer; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
|
| 39 | - * @param \Generated\Shared\Transfer\ItemTransfer $itemTransfer |
|
| 40 | - * |
|
| 41 | - * @return bool |
|
| 42 | - */ |
|
| 37 | + /** |
|
| 38 | + * @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer |
|
| 39 | + * @param \Generated\Shared\Transfer\ItemTransfer $itemTransfer |
|
| 40 | + * |
|
| 41 | + * @return bool |
|
| 42 | + */ |
|
| 43 | 43 | public function isSatisfiedBy(QuoteTransfer $quoteTransfer, ItemTransfer $itemTransfer) |
| 44 | 44 | { |
| 45 | 45 | $this->setAcceptedDataTypes(); |
| 46 | 46 | return $this->rulePlugin->isSatisfiedBy($quoteTransfer, $itemTransfer, $this->clauseTransfer); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | - /** |
|
| 50 | - * @return void |
|
| 51 | - */ |
|
| 49 | + /** |
|
| 50 | + * @return void |
|
| 51 | + */ |
|
| 52 | 52 | protected function setAcceptedDataTypes() |
| 53 | 53 | { |
| 54 | 54 | $this->clauseTransfer->setAcceptedTypes($this->rulePlugin->acceptedDataTypes()); |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | |
| 108 | 108 | $streamedResponse = new StreamedResponse(); |
| 109 | 109 | |
| 110 | - $streamedResponse->setCallback(function () use ($generatedVouchers) { |
|
| 110 | + $streamedResponse->setCallback(function() use ($generatedVouchers) { |
|
| 111 | 111 | $csvHandle = fopen('php://output', 'w+'); |
| 112 | 112 | fputcsv($csvHandle, ['Voucher Code']); |
| 113 | 113 | |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | */ |
| 50 | 50 | public function getAllowedCodeCharactersLength() |
| 51 | 51 | { |
| 52 | - $charactersLength = array_reduce($this->getVoucherCodeCharacters(), function ($length, $items) { |
|
| 52 | + $charactersLength = array_reduce($this->getVoucherCodeCharacters(), function($length, $items) { |
|
| 53 | 53 | $length += count($items); |
| 54 | 54 | |
| 55 | 55 | return $length; |
@@ -119,7 +119,7 @@ |
||
| 119 | 119 | { |
| 120 | 120 | $items = $this->getDiscountableItems( |
| 121 | 121 | [ |
| 122 | - self::ITEM_GROSS_PRICE_1000, |
|
| 122 | + self::ITEM_GROSS_PRICE_1000, |
|
| 123 | 123 | ] |
| 124 | 124 | ); |
| 125 | 125 | |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | |
| 59 | 59 | $discountQueryContainerMock = $this->createDiscountQueryContainerMock(); |
| 60 | 60 | $discountQueryContainerMock->method('queryVoucherPoolByVoucherCodes') |
| 61 | - ->willReturn($discountQueryMock); |
|
| 61 | + ->willReturn($discountQueryMock); |
|
| 62 | 62 | |
| 63 | 63 | $voucherCode = $this->createVoucherCode($discountQueryContainerMock); |
| 64 | 64 | $updated = $voucherCode->useCodes(['123']); |