Completed
Push — support-coverage ( 9a8e61...2263e6 )
by Kentaro
34:05
created
src/Eccube/EventListener/TwigInitializeListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -146,7 +146,7 @@
 block discarded – undo
146 146
         if ($Member instanceof Member) {
147 147
             $AuthorityRoles = $this->authorityRoleRepository->findBy(['Authority' => $this->requestContext->getCurrentUser()->getAuthority()]);
148 148
         }
149
-        $roles = array_map(function (AuthorityRole $AuthorityRole) use ($event) {
149
+        $roles = array_map(function(AuthorityRole $AuthorityRole) use ($event) {
150 150
             return $event->getRequest()->getBaseUrl().'/'.$this->eccubeConfig['eccube_admin_route'].$AuthorityRole->getDenyUrl();
151 151
         }, $AuthorityRoles);
152 152
         $this->twig->addGlobal('AuthorityRoles', $roles);
Please login to merge, or discard this patch.
src/Eccube/Command/InstallerCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
         $question = new ConfirmationQuestion('Is it OK?');
94 94
         if (!$this->io->askQuestion($question)) {
95 95
             // `no`の場合はキャンセルメッセージを出力して終了する
96
-            $this->setCode(function () {
96
+            $this->setCode(function() {
97 97
                 $this->io->success('EC-CUBE installation stopped.');
98 98
             });
99 99
 
Please login to merge, or discard this patch.
src/Eccube/DataCollector/EccubeDataCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
             $Plugins = $this->pluginRepository->findBy([], ['code' => 'ASC']);
117 117
 
118 118
             foreach (array_keys($this->data['plugins']) as $pluginCode) {
119
-                $Plugin = array_filter($Plugins, function ($Plugin) use ($pluginCode) {
119
+                $Plugin = array_filter($Plugins, function($Plugin) use ($pluginCode) {
120 120
                     return $Plugin->getCode() == $pluginCode;
121 121
                 });
122 122
                 if (!empty($Plugin) && count($Plugin) > 0) {
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/PurchaseFlow.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     protected function calculateTotal(ItemHolderInterface $itemHolder)
105 105
     {
106
-        $total = $itemHolder->getItems()->reduce(function ($sum, ItemInterface $item) {
106
+        $total = $itemHolder->getItems()->reduce(function($sum, ItemInterface $item) {
107 107
             $sum += $item->getPriceIncTax() * $item->getQuantity();
108 108
 
109 109
             return $sum;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     {
121 121
         $total = $itemHolder->getItems()
122 122
             ->getProductClasses()
123
-            ->reduce(function ($sum, ItemInterface $item) {
123
+            ->reduce(function($sum, ItemInterface $item) {
124 124
                 $sum += $item->getPriceIncTax() * $item->getQuantity();
125 125
 
126 126
                 return $sum;
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
     {
140 140
         $total = $itemHolder->getItems()
141 141
             ->getDeliveryFees()
142
-            ->reduce(function ($sum, ItemInterface $item) {
142
+            ->reduce(function($sum, ItemInterface $item) {
143 143
                 $sum += $item->getPriceIncTax() * $item->getQuantity();
144 144
 
145 145
                 return $sum;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
     {
155 155
         $total = $itemHolder->getItems()
156 156
             ->getDiscounts()
157
-            ->reduce(function ($sum, ItemInterface $item) {
157
+            ->reduce(function($sum, ItemInterface $item) {
158 158
                 $sum += $item->getPriceIncTax() * $item->getQuantity();
159 159
 
160 160
                 return $sum;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
     {
171 171
         $total = $itemHolder->getItems()
172 172
             ->getCharges()
173
-            ->reduce(function ($sum, ItemInterface $item) {
173
+            ->reduce(function($sum, ItemInterface $item) {
174 174
                 $sum += $item->getPriceIncTax() * $item->getQuantity();
175 175
 
176 176
                 return $sum;
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
     protected function calculateTax(ItemHolderInterface $itemHolder)
185 185
     {
186 186
         $total = $itemHolder->getItems()
187
-            ->reduce(function ($sum, ItemInterface $item) {
187
+            ->reduce(function($sum, ItemInterface $item) {
188 188
                 $sum += ($item->getPriceIncTax() - $item->getPrice()) * $item->getQuantity();
189 189
 
190 190
                 return $sum;
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/Processor/OrderCodePurchaseProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
                     $this->entityManager->flush();
36 36
                 }
37 37
 
38
-                $orderCode = preg_replace_callback('/\${(.*)}/U', function ($matches) use ($Order) {
38
+                $orderCode = preg_replace_callback('/\${(.*)}/U', function($matches) use ($Order) {
39 39
                     if (count($matches) == 2) {
40 40
                         switch ($matches[1]) {
41 41
                             case 'yyyy':
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/ItemCollection.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
     public function getProductClasses()
32 32
     {
33 33
         return $this->filter(
34
-            function (ItemInterface $OrderItem) {
34
+            function(ItemInterface $OrderItem) {
35 35
                 return $OrderItem->isProduct();
36 36
             });
37 37
     }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function getDeliveryFees()
40 40
     {
41 41
         return $this->filter(
42
-            function (ItemInterface $OrderItem) {
42
+            function(ItemInterface $OrderItem) {
43 43
                 return $OrderItem->isDeliveryFee();
44 44
             });
45 45
     }
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function getCharges()
48 48
     {
49 49
         return $this->filter(
50
-            function (ItemInterface $OrderItem) {
50
+            function(ItemInterface $OrderItem) {
51 51
                 return $OrderItem->isCharge();
52 52
             });
53 53
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     public function getDiscounts()
56 56
     {
57 57
         return $this->filter(
58
-            function (ItemInterface $OrderItem) {
58
+            function(ItemInterface $OrderItem) {
59 59
                 return $OrderItem->isDiscount();
60 60
             });
61 61
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function hasProductByName($productName)
69 69
     {
70 70
         $OrderItems = $this->filter(
71
-            function (ItemInterface $OrderItem) use ($productName) {
71
+            function(ItemInterface $OrderItem) use ($productName) {
72 72
                 /* @var OrderItem $OrderItem */
73 73
                 return $OrderItem->getProductName() == $productName;
74 74
             });
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function hasItemByOrderItemType($OrderItemType)
87 87
     {
88
-        $filteredItems = $this->filter(function (ItemInterface $OrderItem) use ($OrderItemType) {
88
+        $filteredItems = $this->filter(function(ItemInterface $OrderItem) use ($OrderItemType) {
89 89
             /* @var OrderItem $OrderItem */
90 90
             return $OrderItem->getOrderItemType() && $OrderItem->getOrderItemType()->getId() == $OrderItemType->getId();
91 91
         });
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     public function sort()
102 102
     {
103 103
         $Items = $this->toArray();
104
-        usort($Items, function (ItemInterface $a, ItemInterface $b) {
104
+        usort($Items, function(ItemInterface $a, ItemInterface $b) {
105 105
             if ($a->getOrderItemType() === $b->getOrderItemType()) {
106 106
                 return ($a->getId() < $b->getId()) ? -1 : 1;
107 107
             } elseif ($a->isProduct()) {
Please login to merge, or discard this patch.
src/Eccube/Service/PurchaseFlow/PurchaseFlowResult.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function getErrors()
55 55
     {
56
-        return array_filter($this->processResults, function (ProcessResult $processResult) {
56
+        return array_filter($this->processResults, function(ProcessResult $processResult) {
57 57
             return $processResult->isError();
58 58
         });
59 59
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getWarning()
65 65
     {
66
-        return array_filter($this->processResults, function (ProcessResult $processResult) {
66
+        return array_filter($this->processResults, function(ProcessResult $processResult) {
67 67
             return $processResult->isWarning();
68 68
         });
69 69
     }
Please login to merge, or discard this patch.
src/Eccube/Service/OrderHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         // 明細情報の設定
169 169
         $OrderItems = $this->createOrderItemsFromCartItems($CartItems);
170
-        $OrderItemsGroupBySaleType = array_reduce($OrderItems, function ($result, $item) {
170
+        $OrderItemsGroupBySaleType = array_reduce($OrderItems, function($result, $item) {
171 171
             /* @var OrderItem $item */
172 172
             $saleTypeId = $item->getProductClass()->getSaleType()->getId();
173 173
             $result[$saleTypeId][] = $item;
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         $TaxExclude = $this->entityManager->getRepository(TaxDisplayType::class)->find(TaxDisplayType::EXCLUDED);
237 237
         $Taxion = $this->entityManager->getRepository(TaxType::class)->find(TaxType::TAXATION);
238 238
 
239
-        return array_map(function ($item) use ($ProductItemType, $TaxExclude, $Taxion) {
239
+        return array_map(function($item) use ($ProductItemType, $TaxExclude, $Taxion) {
240 240
             /* @var $item CartItem */
241 241
             /* @var $ProductClass \Eccube\Entity\ProductClass */
242 242
             $ProductClass = $item->getProductClass();
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/OrderItemCollection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     public function getProductClasses()
27 27
     {
28 28
         return $this->filter(
29
-            function (ItemInterface $OrderItem) {
29
+            function(ItemInterface $OrderItem) {
30 30
                 return $OrderItem->isProduct();
31 31
             });
32 32
     }
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     public function getDeliveryFees()
35 35
     {
36 36
         return $this->filter(
37
-            function (ItemInterface $OrderItem) {
37
+            function(ItemInterface $OrderItem) {
38 38
                 return $OrderItem->isDeliveryFee();
39 39
             });
40 40
     }
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     public function getCharges()
43 43
     {
44 44
         return $this->filter(
45
-            function (ItemInterface $OrderItem) {
45
+            function(ItemInterface $OrderItem) {
46 46
                 return $OrderItem->isCharge();
47 47
             });
48 48
     }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function getDiscounts()
51 51
     {
52 52
         return $this->filter(
53
-            function (ItemInterface $OrderItem) {
53
+            function(ItemInterface $OrderItem) {
54 54
                 return $OrderItem->isDiscount();
55 55
             });
56 56
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function hasProductByName($productName)
64 64
     {
65 65
         $OrderItems = $this->filter(
66
-            function (ItemInterface $OrderItem) use ($productName) {
66
+            function(ItemInterface $OrderItem) use ($productName) {
67 67
                 /* @var OrderItem $OrderItem */
68 68
                 return $OrderItem->getProductName() == $productName;
69 69
             });
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function hasItemByOrderItemType($OrderItemType)
82 82
     {
83
-        $filteredItems = $this->filter(function (ItemInterface $OrderItem) use ($OrderItemType) {
83
+        $filteredItems = $this->filter(function(ItemInterface $OrderItem) use ($OrderItemType) {
84 84
             /* @var OrderItem $OrderItem */
85 85
             return $OrderItem->getOrderItemType() && $OrderItem->getOrderItemType()->getId() == $OrderItemType->getId();
86 86
         });
Please login to merge, or discard this patch.