@@ -30,7 +30,7 @@ |
||
| 30 | 30 | { |
| 31 | 31 | public function register(Container $app) |
| 32 | 32 | { |
| 33 | - $app->extend('eccube_twig_block_templates', function ($templates) { |
|
| 33 | + $app->extend('eccube_twig_block_templates', function($templates) { |
|
| 34 | 34 | $templates[] = 'TwigUserFunc/Resource/template/hello_block.twig'; |
| 35 | 35 | |
| 36 | 36 | return $templates; |
@@ -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 | |
@@ -146,7 +146,7 @@ |
||
| 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); |
@@ -93,7 +93,7 @@ |
||
| 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 | |
@@ -116,7 +116,7 @@ |
||
| 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) { |
@@ -103,7 +103,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -35,7 +35,7 @@ |
||
| 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': |
@@ -31,7 +31,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |