Passed
Pull Request — master (#2)
by Dominique
22:55
created
Discount/src/Spryker/Zed/Discount/Business/Persistence/DiscountPersist.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Discount/src/Spryker/Zed/Discount/Business/Calculator/Calculator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
      */
192 192
     protected function sortByDiscountAmountDescending(array $collectedDiscountsTransfer)
193 193
     {
194
-        usort($collectedDiscountsTransfer, function (CollectedDiscountTransfer $a, CollectedDiscountTransfer $b) {
194
+        usort($collectedDiscountsTransfer, function(CollectedDiscountTransfer $a, CollectedDiscountTransfer $b) {
195 195
             $amountA = (int)$a->getDiscount()->getAmount();
196 196
             $amountB = (int)$b->getDiscount()->getAmount();
197 197
 
Please login to merge, or discard this patch.
src/Spryker/Zed/Discount/Business/QueryString/SpecificationBuilder.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -148,9 +148,9 @@  discard block
 block discarded – undo
148 148
 
149 149
                 case $this->isValue($token):
150 150
                      $value = $this->clearQuotes($token);
151
-                     $clauseTransfer->setValue($value);
151
+                        $clauseTransfer->setValue($value);
152 152
 
153
-                     $this->clauseValidator->validateClause($clauseTransfer);
153
+                        $this->clauseValidator->validateClause($clauseTransfer);
154 154
 
155 155
                     if ($leftNode === null) {
156 156
                         $leftNode = $this->specificationProvider->getSpecificationContext($clauseTransfer);
@@ -308,8 +308,8 @@  discard block
 block discarded – undo
308 308
      */
309 309
     protected function isValue($token)
310 310
     {
311
-         $first = substr($token, 0, 1);
312
-         $last = substr($token, -1);
311
+            $first = substr($token, 0, 1);
312
+            $last = substr($token, -1);
313 313
 
314 314
         if ($first === '"' && $last === '"') {
315 315
             return true;
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             return true;
320 320
         }
321 321
 
322
-         return false;
322
+            return false;
323 323
     }
324 324
 
325 325
 }
Please login to merge, or discard this patch.
Specification/CollectorSpecification/CollectorAndSpecification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
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
         );
Please login to merge, or discard this patch.
QueryString/Specification/DecisionRuleSpecification/DecisionRuleContext.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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());
Please login to merge, or discard this patch.
src/Spryker/Zed/Discount/Communication/Controller/VoucherController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Discount/src/Spryker/Zed/Discount/Communication/Table/DiscountsTable.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -147,7 +147,7 @@
 block discarded – undo
147 147
      */
148 148
     protected function getStatus(SpyDiscount $discountEntity)
149 149
     {
150
-         return $discountEntity->getIsActive() ? 'Active' : 'Inactive';
150
+            return $discountEntity->getIsActive() ? 'Active' : 'Inactive';
151 151
     }
152 152
 
153 153
     /**
Please login to merge, or discard this patch.
Bundles/Discount/src/Spryker/Zed/Discount/DiscountConfig.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
tests/SprykerTest/Shared/Discount/_support/Helper/DiscountDataHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         $this->debugSection('Discount Id', $discountId);
39 39
 
40 40
         $cleanupModule = $this->getDataCleanupHelper();
41
-        $cleanupModule->_addCleanup(function () use ($discountId) {
41
+        $cleanupModule->_addCleanup(function() use ($discountId) {
42 42
             $this->debug('Deleting Discount: ' . $discountId);
43 43
             $this->getDiscountQuery()->queryDiscount()->findByIdDiscount($discountId)->delete();
44 44
         });
Please login to merge, or discard this patch.