@@ -63,7 +63,7 @@ |
||
| 63 | 63 | public function hasProductByName($productName) |
| 64 | 64 | { |
| 65 | 65 | $ShipmentItems = $this->filter( |
| 66 | - function (ItemInterface $ShipmentItem) use ($productName) { |
|
| 66 | + function(ItemInterface $ShipmentItem) use ($productName) { |
|
| 67 | 67 | /* @var ShipmentItem $ShipmentItem */ |
| 68 | 68 | return $ShipmentItem->getProductName() == $productName; |
| 69 | 69 | }); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $this->buildCalculator($this->CalculateStrategies); |
| 24 | 24 | |
| 25 | 25 | /** @var ShipmentItem $ShipmentItem */ |
| 26 | - foreach($this->ShipmentItems as $ShipmentItem) { |
|
| 26 | + foreach ($this->ShipmentItems as $ShipmentItem) { |
|
| 27 | 27 | if ($ShipmentItem instanceof ShipmentItem) { |
| 28 | 28 | if (!$this->Order->getItems()->contains($ShipmentItem)) { |
| 29 | 29 | $ShipmentItem->setOrder($this->Order); |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | { |
| 15 | 15 | $app->extend( |
| 16 | 16 | 'eccube.purchase.flow.cart.item_processors', |
| 17 | - function (ArrayCollection $processors, Container $app) { |
|
| 17 | + function(ArrayCollection $processors, Container $app) { |
|
| 18 | 18 | $processors[] = new EmptyProcessor(); |
| 19 | 19 | $processors[] = new ValidatableEmptyProcessor(); |
| 20 | 20 | return $processors; |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | $app->extend( |
| 14 | 14 | 'form.type.extensions', |
| 15 | - function ($extensions) { |
|
| 15 | + function($extensions) { |
|
| 16 | 16 | $extensions[] = new EntryTypeExtension(); |
| 17 | 17 | |
| 18 | 18 | return $extensions; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | */ |
| 105 | 105 | protected function calculateTotal(ItemHolderInterface $itemHolder) |
| 106 | 106 | { |
| 107 | - $total = $itemHolder->getItems()->reduce(function ($sum, ItemInterface $item) { |
|
| 107 | + $total = $itemHolder->getItems()->reduce(function($sum, ItemInterface $item) { |
|
| 108 | 108 | $sum += $item->getPriceIncTax() * $item->getQuantity(); |
| 109 | 109 | |
| 110 | 110 | return $sum; |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | { |
| 122 | 122 | $total = $itemHolder->getItems() |
| 123 | 123 | ->getProductClasses() |
| 124 | - ->reduce(function ($sum, ItemInterface $item) { |
|
| 124 | + ->reduce(function($sum, ItemInterface $item) { |
|
| 125 | 125 | $sum += $item->getPriceIncTax() * $item->getQuantity(); |
| 126 | 126 | |
| 127 | 127 | return $sum; |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | $total = $itemHolder->getItems() |
| 142 | 142 | ->getDeliveryFees() |
| 143 | - ->reduce(function ($sum, ItemInterface $item) { |
|
| 143 | + ->reduce(function($sum, ItemInterface $item) { |
|
| 144 | 144 | $sum += $item->getPriceIncTax() * $item->getQuantity(); |
| 145 | 145 | |
| 146 | 146 | return $sum; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | { |
| 156 | 156 | $total = $itemHolder->getItems() |
| 157 | 157 | ->getDiscounts() |
| 158 | - ->reduce(function ($sum, ItemInterface $item) { |
|
| 158 | + ->reduce(function($sum, ItemInterface $item) { |
|
| 159 | 159 | $sum += $item->getPriceIncTax() * $item->getQuantity(); |
| 160 | 160 | |
| 161 | 161 | return $sum; |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | { |
| 172 | 172 | $total = $itemHolder->getItems() |
| 173 | 173 | ->getCharges() |
| 174 | - ->reduce(function ($sum, ItemInterface $item) { |
|
| 174 | + ->reduce(function($sum, ItemInterface $item) { |
|
| 175 | 175 | $sum += $item->getPriceIncTax() * $item->getQuantity(); |
| 176 | 176 | |
| 177 | 177 | return $sum; |
@@ -185,7 +185,7 @@ discard block |
||
| 185 | 185 | protected function calculateTax(ItemHolderInterface $itemHolder) |
| 186 | 186 | { |
| 187 | 187 | $total = $itemHolder->getItems() |
| 188 | - ->reduce(function ($sum, ItemInterface $item) { |
|
| 188 | + ->reduce(function($sum, ItemInterface $item) { |
|
| 189 | 189 | $sum += ($item->getPriceIncTax() - $item->getPrice()) * $item->getQuantity(); |
| 190 | 190 | |
| 191 | 191 | return $sum; |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | public function getProductClasses() |
| 32 | 32 | { |
| 33 | 33 | return $this->filter( |
| 34 | - function (ItemInterface $ShipmentItem) { |
|
| 34 | + function(ItemInterface $ShipmentItem) { |
|
| 35 | 35 | return $ShipmentItem->isProduct(); |
| 36 | 36 | }); |
| 37 | 37 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public function getDeliveryFees() |
| 40 | 40 | { |
| 41 | 41 | return $this->filter( |
| 42 | - function (ItemInterface $ShipmentItem) { |
|
| 42 | + function(ItemInterface $ShipmentItem) { |
|
| 43 | 43 | return $ShipmentItem->isDeliveryFee(); |
| 44 | 44 | }); |
| 45 | 45 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public function getCharges() |
| 48 | 48 | { |
| 49 | 49 | return $this->filter( |
| 50 | - function (ItemInterface $ShipmentItem) { |
|
| 50 | + function(ItemInterface $ShipmentItem) { |
|
| 51 | 51 | return $ShipmentItem->isCharge(); |
| 52 | 52 | }); |
| 53 | 53 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | public function getDiscounts() |
| 56 | 56 | { |
| 57 | 57 | return $this->filter( |
| 58 | - function (ItemInterface $ShipmentItem) { |
|
| 58 | + function(ItemInterface $ShipmentItem) { |
|
| 59 | 59 | return $ShipmentItem->isDiscount(); |
| 60 | 60 | }); |
| 61 | 61 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | public function hasProductByName($productName) |
| 69 | 69 | { |
| 70 | 70 | $ShipmentItems = $this->filter( |
| 71 | - function (ItemInterface $ShipmentItem) use ($productName) { |
|
| 71 | + function(ItemInterface $ShipmentItem) use ($productName) { |
|
| 72 | 72 | /* @var ShipmentItem $ShipmentItem */ |
| 73 | 73 | return $ShipmentItem->getProductName() == $productName; |
| 74 | 74 | }); |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function hasItemByOrderItemType($OrderItemType) |
| 87 | 87 | { |
| 88 | - $filteredItems = $this->filter(function (ItemInterface $ShipmentItem) use ($OrderItemType) { |
|
| 88 | + $filteredItems = $this->filter(function(ItemInterface $ShipmentItem) use ($OrderItemType) { |
|
| 89 | 89 | /* @var ShipmentItem $ShipmentItem */ |
| 90 | 90 | return $ShipmentItem->getOrderItemType() && $ShipmentItem->getOrderItemType()->getId() == $OrderItemType->getId(); |
| 91 | 91 | }); |
@@ -101,7 +101,7 @@ discard block |
||
| 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()) { |
@@ -53,7 +53,7 @@ discard block |
||
| 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 |
||
| 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 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | if (is_callable($function)) { |
| 69 | 69 | return call_user_func_array($function, $arg_list); |
| 70 | 70 | } |
| 71 | - trigger_error('Called to an undefined function : php_'. $function, E_USER_WARNING); |
|
| 71 | + trigger_error('Called to an undefined function : php_'.$function, E_USER_WARNING); |
|
| 72 | 72 | |
| 73 | 73 | }, ['pre_escape' => 'html', 'is_safe' => ['html']]), |
| 74 | 74 | |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | public function getCsrfTokenForAnchor() |
| 157 | 157 | { |
| 158 | 158 | $token = $this->app['csrf.token_manager']->getToken(Constant::TOKEN_NAME)->getValue(); |
| 159 | - return 'token-for-anchor=\'' . $token . '\''; |
|
| 159 | + return 'token-for-anchor=\''.$token.'\''; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | /** |
@@ -817,7 +817,7 @@ |
||
| 817 | 817 | if ($dispatcher instanceof Response |
| 818 | 818 | && ($dispatcher->isRedirection() || $dispatcher->getContent()) |
| 819 | 819 | ) { // $paymentMethod->apply() が Response を返した場合は画面遷移 |
| 820 | - return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御? |
|
| 820 | + return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御? |
|
| 821 | 821 | } |
| 822 | 822 | $PaymentResult = $paymentService->doCheckout($paymentMethod); // 決済実行 |
| 823 | 823 | if (!$PaymentResult->isSuccess()) { |