@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | $app = $this->app; |
146 | 146 | // XXX price を priceIncTax にセットし直す |
147 | 147 | // ShipmentItem::getTotalPrice でもやっているので、どこか一箇所にまとめたい |
148 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($app) { |
|
148 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($app) { |
|
149 | 149 | /** @var \Eccube\Entity\ShipmentItem $ShipmentItem */ |
150 | 150 | $ShipmentItem = $event->getData(); |
151 | 151 | $TaxDisplayType = $ShipmentItem->getTaxDisplayType(); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | $event->setData($ShipmentItem); |
165 | 165 | }); |
166 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
166 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
167 | 167 | // モーダルからのPOST時に、金額等をセットする. |
168 | 168 | if ('modal' === $app['request_stack']->getCurrentRequest()->get('modal')) { |
169 | 169 | $data = $event->getData(); |
@@ -233,17 +233,13 @@ discard block |
||
233 | 233 | $data['product_name'] = $Product->getName(); |
234 | 234 | $data['product_code'] = $ProductClass->getCode(); |
235 | 235 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
236 | - $ProductClass->getClassCategory1()->getClassName() : |
|
237 | - null; |
|
236 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
238 | 237 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
239 | - $ProductClass->getClassCategory2()->getClassName() : |
|
240 | - null; |
|
238 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
241 | 239 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
242 | - $ProductClass->getClassCategory1()->getName() : |
|
243 | - null; |
|
240 | + $ProductClass->getClassCategory1()->getName() : null; |
|
244 | 241 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
245 | - $ProductClass->getClassCategory2()->getName() : |
|
246 | - null; |
|
242 | + $ProductClass->getClassCategory2()->getName() : null; |
|
247 | 243 | $data['price'] = $ProductClass->getPrice02(); |
248 | 244 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
249 | 245 | $data['tax_type'] = TaxType::TAXATION; |
@@ -12,14 +12,14 @@ |
||
12 | 12 | public function register(Container $app) |
13 | 13 | { |
14 | 14 | // サンプルの空Strategyをコンテナに登録 |
15 | - $app['eccube.calculate.strategy.empty'] = function () { |
|
15 | + $app['eccube.calculate.strategy.empty'] = function() { |
|
16 | 16 | return new EmptyStrategy(); |
17 | 17 | }; |
18 | 18 | |
19 | 19 | // 空Strategyを追加. |
20 | 20 | $app->extend( |
21 | 21 | 'eccube.calculate.strategies', |
22 | - function (CalculateStrategyCollection $Collection, Container $app) { |
|
22 | + function(CalculateStrategyCollection $Collection, Container $app) { |
|
23 | 23 | $Collection->add($app['eccube.calculate.strategy.empty']); |
24 | 24 | |
25 | 25 | return $Collection; |
@@ -4,7 +4,6 @@ |
||
4 | 4 | use Eccube\Entity\Order; |
5 | 5 | use Eccube\Entity\PurchaseInterface; |
6 | 6 | use Eccube\Entity\ShipmentItem; |
7 | -use Eccube\Service\Calculator\Strategy\CalculateStrategyInterface; |
|
8 | 7 | |
9 | 8 | class CalculateContext |
10 | 9 | { |
@@ -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); |
@@ -2,13 +2,9 @@ |
||
2 | 2 | namespace Eccube\Service\Calculator\Strategy; |
3 | 3 | |
4 | 4 | use Eccube\Application; |
5 | -use Eccube\Entity\Master\OrderItemType; |
|
6 | -use Eccube\Entity\Master\TaxType; |
|
7 | -use Eccube\Entity\Master\TaxDisplayType; |
|
8 | 5 | use Eccube\Entity\Order; |
9 | 6 | use Eccube\Entity\PurchaseInterface; |
10 | 7 | use Eccube\Entity\ShipmentItem; |
11 | -use Eccube\Entity\Shipping; |
|
12 | 8 | use Eccube\Repository\Master\OrderItemTypeRepository; |
13 | 9 | use Eccube\Service\Calculator\ShipmentItemCollection; |
14 | 10 |
@@ -2,13 +2,9 @@ |
||
2 | 2 | namespace Eccube\Service\Calculator\Strategy; |
3 | 3 | |
4 | 4 | use Eccube\Application; |
5 | -use Eccube\Entity\Master\OrderItemType; |
|
6 | -use Eccube\Entity\Master\TaxType; |
|
7 | -use Eccube\Entity\Master\TaxDisplayType; |
|
8 | 5 | use Eccube\Entity\Order; |
9 | 6 | use Eccube\Entity\PurchaseInterface; |
10 | 7 | use Eccube\Entity\ShipmentItem; |
11 | -use Eccube\Entity\Shipping; |
|
12 | 8 | use Eccube\Repository\Master\OrderItemTypeRepository; |
13 | 9 | use Eccube\Service\Calculator\ShipmentItemCollection; |
14 | 10 |
@@ -2,14 +2,10 @@ |
||
2 | 2 | namespace Eccube\Service\Calculator\Strategy; |
3 | 3 | |
4 | 4 | use Eccube\Application; |
5 | -use Eccube\Entity\Master\OrderItemType; |
|
6 | -use Eccube\Entity\Master\TaxType; |
|
7 | -use Eccube\Entity\Master\TaxDisplayType; |
|
8 | 5 | use Eccube\Entity\Cart; |
9 | 6 | use Eccube\Entity\Order; |
10 | 7 | use Eccube\Entity\PurchaseInterface; |
11 | 8 | use Eccube\Entity\ShipmentItem; |
12 | -use Eccube\Entity\Shipping; |
|
13 | 9 | use Eccube\Repository\Master\OrderItemTypeRepository; |
14 | 10 | use Eccube\Service\Calculator\ShipmentItemCollection; |
15 | 11 |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Eccube\Entity\Order; |
9 | 9 | use Eccube\Entity\PurchaseInterface; |
10 | 10 | use Eccube\Entity\ShipmentItem; |
11 | -use Eccube\Entity\Shipping; |
|
12 | 11 | use Eccube\Repository\Master\OrderItemTypeRepository; |
13 | 12 | use Eccube\Service\Calculator\ShipmentItemCollection; |
14 | 13 |
@@ -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 | }); |