@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $builder->addEventListener( |
40 | 40 | FormEvents::PRE_SET_DATA, |
41 | - function (FormEvent $event) { |
|
41 | + function(FormEvent $event) { |
|
42 | 42 | $form = $event->getForm(); |
43 | 43 | $config = $form->getConfig(); |
44 | 44 | // data_classオプションが必要 |
@@ -16,7 +16,7 @@ |
||
16 | 16 | return new \Mobile_Detect(); |
17 | 17 | }; |
18 | 18 | |
19 | - $app['mobile_detect.device_type'] = function ($app) { |
|
19 | + $app['mobile_detect.device_type'] = function($app) { |
|
20 | 20 | if ($app['mobile_detect']->isMobile()) { |
21 | 21 | return \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP; |
22 | 22 | } else { |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | const PRODUCT_SEARCH = 'Product.getQueryBuilderBySearchData'; |
30 | 30 | const PRODUCT_SEARCH_ADMIN = 'Product.getQueryBuilderBySearchDataForAdmin'; |
31 | - const PRODUCT_GET_FAVORITE = 'Product.getFavoriteProductQueryBuilderByCustomer'; |
|
31 | + const PRODUCT_GET_FAVORITE = 'Product.getFavoriteProductQueryBuilderByCustomer'; |
|
32 | 32 | |
33 | 33 | const CUSTOMER_SEARCH = 'Customer.getQueryBuilderBySearchData'; |
34 | 34 |
@@ -28,7 +28,7 @@ |
||
28 | 28 | public function load(ObjectManager $manager) |
29 | 29 | { |
30 | 30 | // CSV Reader に設定 |
31 | - $this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY |\SplFileObject::DROP_NEW_LINE); |
|
31 | + $this->file->setFlags(\SplFileObject::READ_CSV|\SplFileObject::READ_AHEAD|\SplFileObject::SKIP_EMPTY|\SplFileObject::DROP_NEW_LINE); |
|
32 | 32 | |
33 | 33 | // ヘッダ行を取得 |
34 | 34 | $headers = $this->file->current(); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | // 配送業者のプルダウンを生成 |
60 | 60 | $builder->addEventListener( |
61 | 61 | FormEvents::PRE_SET_DATA, |
62 | - function (FormEvent $event) { |
|
62 | + function(FormEvent $event) { |
|
63 | 63 | /* @var Shipping $Shipping */ |
64 | 64 | $Shipping = $event->getData(); |
65 | 65 | if (is_null($Shipping) || !$Shipping->getId()) { |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | // お届け日のプルダウンを生成 |
102 | 102 | $builder->addEventListener( |
103 | 103 | FormEvents::PRE_SET_DATA, |
104 | - function (FormEvent $event) { |
|
104 | + function(FormEvent $event) { |
|
105 | 105 | $Shipping = $event->getData(); |
106 | 106 | if (is_null($Shipping) || !$Shipping->getId()) { |
107 | 107 | return; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | // 配送日数が設定されている |
141 | 141 | if ($deliveryDateFlag) { |
142 | - $period = new \DatePeriod ( |
|
142 | + $period = new \DatePeriod( |
|
143 | 143 | new \DateTime($minDate.' day'), |
144 | 144 | new \DateInterval('P1D'), |
145 | 145 | new \DateTime($minDate + $this->config['deliv_date_end_max'].' day') |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | // お届け時間のプルダウンを生成 |
168 | 168 | $builder->addEventListener( |
169 | 169 | FormEvents::PRE_SET_DATA, |
170 | - function (FormEvent $event) { |
|
170 | + function(FormEvent $event) { |
|
171 | 171 | $Shipping = $event->getData(); |
172 | 172 | if (is_null($Shipping) || !$Shipping->getId()) { |
173 | 173 | return; |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | // 支払い方法のプルダウンを生成 |
86 | 86 | $builder->addEventListener( |
87 | 87 | FormEvents::PRE_SET_DATA, |
88 | - function (FormEvent $event) { |
|
88 | + function(FormEvent $event) { |
|
89 | 89 | /** @var Order $Order */ |
90 | 90 | $Order = $event->getData(); |
91 | 91 | if (is_null($Order) || !$Order->getId()) { |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | // TODO Calculatorで行うのが適切. |
134 | 134 | $builder->addEventListener( |
135 | 135 | FormEvents::POST_SUBMIT, |
136 | - function (FormEvent $event) { |
|
136 | + function(FormEvent $event) { |
|
137 | 137 | /** @var Order $Order */ |
138 | 138 | $Order = $event->getData(); |
139 | 139 | $Payment = $Order->getPayment(); |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | 'prototype' => true, |
176 | 176 | )) |
177 | 177 | |
178 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($BaseInfo) { |
|
178 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($BaseInfo) { |
|
179 | 179 | if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
180 | 180 | $form = $event->getForm(); |
181 | 181 | $form->add('ShipmentItems', CollectionType::class, array( |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | )); |
187 | 187 | } |
188 | 188 | }) |
189 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
189 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
190 | 190 | /** @var \Eccube\Entity\Shipping $data */ |
191 | 191 | $data = $event->getData(); |
192 | 192 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | 'choice_label' => 'delivery_time', |
206 | 206 | 'placeholder' => '指定なし', |
207 | 207 | 'required' => false, |
208 | - 'query_builder' => function (EntityRepository $er) use($Delivery) { |
|
208 | + 'query_builder' => function(EntityRepository $er) use($Delivery) { |
|
209 | 209 | return $er->createQueryBuilder('dt') |
210 | 210 | ->where('dt.Delivery = :Delivery') |
211 | 211 | ->setParameter('Delivery', $Delivery); |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | )); |
214 | 214 | |
215 | 215 | }) |
216 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
216 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
217 | 217 | $data = $event->getData(); |
218 | 218 | $form = $event->getForm(); |
219 | 219 | if (!$data) { |
@@ -233,14 +233,14 @@ discard block |
||
233 | 233 | 'choice_label' => 'delivery_time', |
234 | 234 | 'placeholder' => '指定なし', |
235 | 235 | 'required' => false, |
236 | - 'query_builder' => function (EntityRepository $er) use($Delivery) { |
|
236 | + 'query_builder' => function(EntityRepository $er) use($Delivery) { |
|
237 | 237 | return $er->createQueryBuilder('dt') |
238 | 238 | ->where('dt.Delivery = :Delivery') |
239 | 239 | ->setParameter('Delivery', $Delivery); |
240 | 240 | }, |
241 | 241 | )); |
242 | 242 | }) |
243 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
243 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
244 | 244 | if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
245 | 245 | $form = $event->getForm(); |
246 | 246 | $shipmentItems = $form['ShipmentItems']->getData(); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | } |
252 | 252 | } |
253 | 253 | }) |
254 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
254 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
255 | 255 | $Shipping = $event->getData(); |
256 | 256 | $Delivery = $Shipping->getDelivery(); |
257 | 257 | $Shipping->setShippingDeliveryName($Delivery ? $Delivery : null); |
@@ -446,7 +446,7 @@ |
||
446 | 446 | $session->set('eccube.admin.order.product.search', $searchData); |
447 | 447 | $session->set('eccube.admin.order.product.search.page_no', $page_no); |
448 | 448 | } else { |
449 | - $searchData = (array)$session->get('eccube.admin.order.product.search'); |
|
449 | + $searchData = (array) $session->get('eccube.admin.order.product.search'); |
|
450 | 450 | if (is_null($page_no)) { |
451 | 451 | $page_no = intval($session->get('eccube.admin.order.product.search.page_no')); |
452 | 452 | } else { |
@@ -45,31 +45,31 @@ discard block |
||
45 | 45 | public function register(Container $app) |
46 | 46 | { |
47 | 47 | // Service |
48 | - $app['eccube.service.system'] = function () use ($app) { |
|
48 | + $app['eccube.service.system'] = function() use ($app) { |
|
49 | 49 | return new \Eccube\Service\SystemService($app); |
50 | 50 | }; |
51 | - $app['view'] = function () use ($app) { |
|
51 | + $app['view'] = function() use ($app) { |
|
52 | 52 | return $app['twig']; |
53 | 53 | }; |
54 | - $app['eccube.service.cart'] = function () use ($app) { |
|
54 | + $app['eccube.service.cart'] = function() use ($app) { |
|
55 | 55 | return new \Eccube\Service\CartService($app); |
56 | 56 | }; |
57 | - $app['eccube.service.order'] = function () use ($app) { |
|
57 | + $app['eccube.service.order'] = function() use ($app) { |
|
58 | 58 | return new \Eccube\Service\OrderService($app); |
59 | 59 | }; |
60 | - $app['eccube.service.tax_rule'] = function () use ($app) { |
|
60 | + $app['eccube.service.tax_rule'] = function() use ($app) { |
|
61 | 61 | return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']); |
62 | 62 | }; |
63 | - $app['eccube.service.plugin'] = function () use ($app) { |
|
63 | + $app['eccube.service.plugin'] = function() use ($app) { |
|
64 | 64 | return new \Eccube\Service\PluginService($app); |
65 | 65 | }; |
66 | - $app['eccube.service.mail'] = function () use ($app) { |
|
66 | + $app['eccube.service.mail'] = function() use ($app) { |
|
67 | 67 | return new \Eccube\Service\MailService($app); |
68 | 68 | }; |
69 | - $app['eccube.calculate.context'] = function () use ($app) { |
|
69 | + $app['eccube.calculate.context'] = function() use ($app) { |
|
70 | 70 | return new \Eccube\Service\Calculator\CalculateContext(); |
71 | 71 | }; |
72 | - $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) { |
|
72 | + $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) { |
|
73 | 73 | $Service = new \Eccube\Service\CalculateService($Order, $Customer); |
74 | 74 | $Context = $app['eccube.calculate.context']; |
75 | 75 | $Context->setCalculateStrategies($app['eccube.calculate.strategies']($Order)); |
@@ -78,40 +78,40 @@ discard block |
||
78 | 78 | return $Service; |
79 | 79 | }); |
80 | 80 | |
81 | - $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) { |
|
81 | + $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) { |
|
82 | 82 | $Service = new $clazz; |
83 | 83 | $Service->setApplication($app); |
84 | 84 | return $Service; |
85 | 85 | }); |
86 | 86 | |
87 | - $app['eccube.calculate.strategies'] = $app->protect(function ($Order) use ($app) { |
|
87 | + $app['eccube.calculate.strategies'] = $app->protect(function($Order) use ($app) { |
|
88 | 88 | $Strategies = new \Doctrine\Common\Collections\ArrayCollection(); // TODO 暫定的に ArrayCollection とする. 専用クラスにしたい |
89 | 89 | // デフォルトのストラテジーをセットしておく |
90 | 90 | $Strategies->add($app['eccube.calculate.strategy.shipping']($Order)); |
91 | 91 | $Strategies->add($app['eccube.calculate.strategy.tax']($Order)); |
92 | 92 | return $Strategies; |
93 | 93 | }); |
94 | - $app['eccube.calculate.strategy.shipping'] = $app->protect(function ($Order) use ($app) { |
|
94 | + $app['eccube.calculate.strategy.shipping'] = $app->protect(function($Order) use ($app) { |
|
95 | 95 | $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy(); |
96 | 96 | $Strategy->setApplication($app); |
97 | 97 | $Strategy->setOrder($Order); |
98 | 98 | return $Strategy; |
99 | 99 | }); |
100 | - $app['eccube.calculate.strategy.tax'] = $app->protect(function ($Order) use ($app) { |
|
100 | + $app['eccube.calculate.strategy.tax'] = $app->protect(function($Order) use ($app) { |
|
101 | 101 | $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy(); |
102 | 102 | $Strategy->setApplication($app); |
103 | 103 | $Strategy->setOrder($Order); |
104 | 104 | return $Strategy; |
105 | 105 | }); |
106 | 106 | |
107 | - $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) { |
|
107 | + $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) { |
|
108 | 108 | $PaymentMethod = new $clazz; |
109 | 109 | $PaymentMethod->setApplication($app); |
110 | 110 | $PaymentMethod->setFormType($form); |
111 | 111 | return $PaymentMethod; |
112 | 112 | }); |
113 | 113 | |
114 | - $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) { |
|
114 | + $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) { |
|
115 | 115 | $PaymentMethod = new $clazz; |
116 | 116 | $PaymentMethod->setApplication($app); |
117 | 117 | $PaymentMethod->setFormType($form); |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | return $PaymentMethod; |
120 | 120 | }); |
121 | 121 | |
122 | - $app['eccube.helper.order'] = function ($app) { |
|
122 | + $app['eccube.helper.order'] = function($app) { |
|
123 | 123 | return new OrderHelper($app); |
124 | 124 | }; |
125 | 125 | |
126 | - $app['eccube.service.csv.export'] = function () use ($app) { |
|
126 | + $app['eccube.service.csv.export'] = function() use ($app) { |
|
127 | 127 | $csvService = new \Eccube\Service\CsvExportService(); |
128 | 128 | $csvService->setEntityManager($app['orm.em']); |
129 | 129 | $csvService->setConfig($app['config']); |
@@ -135,206 +135,206 @@ discard block |
||
135 | 135 | |
136 | 136 | return $csvService; |
137 | 137 | }; |
138 | - $app['eccube.service.shopping'] = function () use ($app) { |
|
138 | + $app['eccube.service.shopping'] = function() use ($app) { |
|
139 | 139 | return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']); |
140 | 140 | }; |
141 | 141 | |
142 | 142 | // Repository |
143 | - $app['eccube.repository.master.authority'] = function () use ($app) { |
|
143 | + $app['eccube.repository.master.authority'] = function() use ($app) { |
|
144 | 144 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority'); |
145 | 145 | }; |
146 | - $app['eccube.repository.master.tag'] = function () use ($app) { |
|
146 | + $app['eccube.repository.master.tag'] = function() use ($app) { |
|
147 | 147 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag'); |
148 | 148 | }; |
149 | - $app['eccube.repository.master.pref'] = function () use ($app) { |
|
149 | + $app['eccube.repository.master.pref'] = function() use ($app) { |
|
150 | 150 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref'); |
151 | 151 | }; |
152 | - $app['eccube.repository.master.sex'] = function () use ($app) { |
|
152 | + $app['eccube.repository.master.sex'] = function() use ($app) { |
|
153 | 153 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex'); |
154 | 154 | }; |
155 | - $app['eccube.repository.master.disp'] = function () use ($app) { |
|
155 | + $app['eccube.repository.master.disp'] = function() use ($app) { |
|
156 | 156 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp'); |
157 | 157 | }; |
158 | - $app['eccube.repository.master.product_type'] = function () use ($app) { |
|
158 | + $app['eccube.repository.master.product_type'] = function() use ($app) { |
|
159 | 159 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType'); |
160 | 160 | }; |
161 | - $app['eccube.repository.master.page_max'] = function () use ($app) { |
|
161 | + $app['eccube.repository.master.page_max'] = function() use ($app) { |
|
162 | 162 | return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax'); |
163 | 163 | }; |
164 | - $app['eccube.repository.master.order_status'] = function () use ($app) { |
|
164 | + $app['eccube.repository.master.order_status'] = function() use ($app) { |
|
165 | 165 | }; |
166 | - $app['eccube.repository.master.product_list_max'] = function () use ($app) { |
|
166 | + $app['eccube.repository.master.product_list_max'] = function() use ($app) { |
|
167 | 167 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListMax'); |
168 | 168 | }; |
169 | - $app['eccube.repository.master.product_list_order_by'] = function () use ($app) { |
|
169 | + $app['eccube.repository.master.product_list_order_by'] = function() use ($app) { |
|
170 | 170 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListOrderBy'); |
171 | 171 | }; |
172 | - $app['eccube.repository.master.order_status'] = function () use ($app) { |
|
172 | + $app['eccube.repository.master.order_status'] = function() use ($app) { |
|
173 | 173 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
174 | 174 | }; |
175 | - $app['eccube.repository.master.device_type'] = function () use ($app) { |
|
175 | + $app['eccube.repository.master.device_type'] = function() use ($app) { |
|
176 | 176 | return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType'); |
177 | 177 | }; |
178 | - $app['eccube.repository.master.csv_type'] = function () use ($app) { |
|
178 | + $app['eccube.repository.master.csv_type'] = function() use ($app) { |
|
179 | 179 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType'); |
180 | 180 | }; |
181 | - $app['eccube.repository.master.order_item_type'] = function () use ($app) { |
|
181 | + $app['eccube.repository.master.order_item_type'] = function() use ($app) { |
|
182 | 182 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderItemType'); |
183 | 183 | }; |
184 | 184 | |
185 | - $app['eccube.repository.delivery'] = function () use ($app) { |
|
185 | + $app['eccube.repository.delivery'] = function() use ($app) { |
|
186 | 186 | return $app['orm.em']->getRepository('Eccube\Entity\Delivery'); |
187 | 187 | }; |
188 | - $app['eccube.repository.delivery_date'] = function () use ($app) { |
|
188 | + $app['eccube.repository.delivery_date'] = function() use ($app) { |
|
189 | 189 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate'); |
190 | 190 | }; |
191 | - $app['eccube.repository.delivery_fee'] = function () use ($app) { |
|
191 | + $app['eccube.repository.delivery_fee'] = function() use ($app) { |
|
192 | 192 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee'); |
193 | 193 | }; |
194 | - $app['eccube.repository.delivery_time'] = function () use ($app) { |
|
194 | + $app['eccube.repository.delivery_time'] = function() use ($app) { |
|
195 | 195 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime'); |
196 | 196 | }; |
197 | - $app['eccube.repository.payment'] = function () use ($app) { |
|
197 | + $app['eccube.repository.payment'] = function() use ($app) { |
|
198 | 198 | return $app['orm.em']->getRepository('Eccube\Entity\Payment'); |
199 | 199 | }; |
200 | - $app['eccube.repository.payment_option'] = function () use ($app) { |
|
200 | + $app['eccube.repository.payment_option'] = function() use ($app) { |
|
201 | 201 | return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption'); |
202 | 202 | }; |
203 | - $app['eccube.repository.category'] = function () use ($app) { |
|
203 | + $app['eccube.repository.category'] = function() use ($app) { |
|
204 | 204 | $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category'); |
205 | 205 | $CategoryRepository->setApplication($app); |
206 | 206 | |
207 | 207 | return $CategoryRepository; |
208 | 208 | }; |
209 | - $app['eccube.repository.customer'] = function () use ($app) { |
|
209 | + $app['eccube.repository.customer'] = function() use ($app) { |
|
210 | 210 | $customerRepository = $app['orm.em']->getRepository('Eccube\Entity\Customer'); |
211 | 211 | $customerRepository->setApplication($app); |
212 | 212 | return $customerRepository; |
213 | 213 | }; |
214 | - $app['eccube.repository.news'] = function () use ($app) { |
|
214 | + $app['eccube.repository.news'] = function() use ($app) { |
|
215 | 215 | return $app['orm.em']->getRepository('Eccube\Entity\News'); |
216 | 216 | }; |
217 | - $app['eccube.repository.mail_history'] = function () use ($app) { |
|
217 | + $app['eccube.repository.mail_history'] = function() use ($app) { |
|
218 | 218 | return $app['orm.em']->getRepository('Eccube\Entity\MailHistory'); |
219 | 219 | }; |
220 | - $app['eccube.repository.member'] = function () use ($app) { |
|
220 | + $app['eccube.repository.member'] = function() use ($app) { |
|
221 | 221 | $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member'); |
222 | 222 | $memberRepository->setEncoderFactorty($app['security.encoder_factory']); |
223 | 223 | return $memberRepository; |
224 | 224 | }; |
225 | - $app['eccube.repository.order'] = function () use ($app) { |
|
225 | + $app['eccube.repository.order'] = function() use ($app) { |
|
226 | 226 | return $app['orm.em']->getRepository('Eccube\Entity\Order'); |
227 | 227 | }; |
228 | - $app['eccube.repository.product'] = function () use ($app) { |
|
228 | + $app['eccube.repository.product'] = function() use ($app) { |
|
229 | 229 | $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product'); |
230 | 230 | $productRepository->setApplication($app); |
231 | 231 | |
232 | 232 | return $productRepository; |
233 | 233 | }; |
234 | - $app['eccube.repository.product_image'] = function () use ($app) { |
|
234 | + $app['eccube.repository.product_image'] = function() use ($app) { |
|
235 | 235 | return $app['orm.em']->getRepository('Eccube\Entity\ProductImage'); |
236 | 236 | }; |
237 | - $app['eccube.repository.product_class'] = function () use ($app) { |
|
237 | + $app['eccube.repository.product_class'] = function() use ($app) { |
|
238 | 238 | return $app['orm.em']->getRepository('Eccube\Entity\ProductClass'); |
239 | 239 | }; |
240 | - $app['eccube.repository.product_stock'] = function () use ($app) { |
|
240 | + $app['eccube.repository.product_stock'] = function() use ($app) { |
|
241 | 241 | return $app['orm.em']->getRepository('Eccube\Entity\ProductStock'); |
242 | 242 | }; |
243 | - $app['eccube.repository.product_tag'] = function () use ($app) { |
|
243 | + $app['eccube.repository.product_tag'] = function() use ($app) { |
|
244 | 244 | return $app['orm.em']->getRepository('Eccube\Entity\ProductTag'); |
245 | 245 | }; |
246 | - $app['eccube.repository.class_name'] = function () use ($app) { |
|
246 | + $app['eccube.repository.class_name'] = function() use ($app) { |
|
247 | 247 | return $app['orm.em']->getRepository('Eccube\Entity\ClassName'); |
248 | 248 | }; |
249 | - $app['eccube.repository.class_category'] = function () use ($app) { |
|
249 | + $app['eccube.repository.class_category'] = function() use ($app) { |
|
250 | 250 | return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory'); |
251 | 251 | }; |
252 | - $app['eccube.repository.customer_favorite_product'] = function () use ($app) { |
|
252 | + $app['eccube.repository.customer_favorite_product'] = function() use ($app) { |
|
253 | 253 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct'); |
254 | 254 | }; |
255 | - $app['eccube.repository.base_info'] = function () use ($app) { |
|
255 | + $app['eccube.repository.base_info'] = function() use ($app) { |
|
256 | 256 | $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo'); |
257 | 257 | $BaseInfoRepository->setApplication($app); |
258 | 258 | |
259 | 259 | return $BaseInfoRepository; |
260 | 260 | }; |
261 | - $app['eccube.repository.tax_rule'] = function () use ($app) { |
|
261 | + $app['eccube.repository.tax_rule'] = function() use ($app) { |
|
262 | 262 | $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule'); |
263 | 263 | $taxRuleRepository->setApplication($app); |
264 | 264 | |
265 | 265 | return $taxRuleRepository; |
266 | 266 | }; |
267 | - $app['eccube.repository.page_layout'] = function () use ($app) { |
|
267 | + $app['eccube.repository.page_layout'] = function() use ($app) { |
|
268 | 268 | $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout'); |
269 | 269 | $pageLayoutRepository->setApplication($app); |
270 | 270 | |
271 | 271 | return $pageLayoutRepository; |
272 | 272 | }; |
273 | - $app['eccube.repository.block'] = function () use ($app) { |
|
273 | + $app['eccube.repository.block'] = function() use ($app) { |
|
274 | 274 | $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block'); |
275 | 275 | $blockRepository->setApplication($app); |
276 | 276 | |
277 | 277 | return $blockRepository; |
278 | 278 | }; |
279 | - $app['eccube.repository.order'] = function () use ($app) { |
|
279 | + $app['eccube.repository.order'] = function() use ($app) { |
|
280 | 280 | $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order'); |
281 | 281 | $orderRepository->setApplication($app); |
282 | 282 | |
283 | 283 | return $orderRepository; |
284 | 284 | }; |
285 | - $app['eccube.repository.customer_address'] = function () use ($app) { |
|
285 | + $app['eccube.repository.customer_address'] = function() use ($app) { |
|
286 | 286 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress'); |
287 | 287 | }; |
288 | - $app['eccube.repository.shipping'] = function () use ($app) { |
|
288 | + $app['eccube.repository.shipping'] = function() use ($app) { |
|
289 | 289 | return $app['orm.em']->getRepository('Eccube\Entity\Shipping'); |
290 | 290 | }; |
291 | - $app['eccube.repository.shipment_item'] = function () use ($app) { |
|
291 | + $app['eccube.repository.shipment_item'] = function() use ($app) { |
|
292 | 292 | return $app['orm.em']->getRepository('Eccube\Entity\ShipmentItem'); |
293 | 293 | }; |
294 | - $app['eccube.repository.customer_status'] = function () use ($app) { |
|
294 | + $app['eccube.repository.customer_status'] = function() use ($app) { |
|
295 | 295 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus'); |
296 | 296 | }; |
297 | - $app['eccube.repository.order_status'] = function () use ($app) { |
|
297 | + $app['eccube.repository.order_status'] = function() use ($app) { |
|
298 | 298 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
299 | 299 | }; |
300 | - $app['eccube.repository.mail_template'] = function () use ($app) { |
|
300 | + $app['eccube.repository.mail_template'] = function() use ($app) { |
|
301 | 301 | return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate'); |
302 | 302 | }; |
303 | - $app['eccube.repository.csv'] = function () use ($app) { |
|
303 | + $app['eccube.repository.csv'] = function() use ($app) { |
|
304 | 304 | return $app['orm.em']->getRepository('Eccube\Entity\Csv'); |
305 | 305 | }; |
306 | - $app['eccube.repository.template'] = function () use ($app) { |
|
306 | + $app['eccube.repository.template'] = function() use ($app) { |
|
307 | 307 | return $app['orm.em']->getRepository('Eccube\Entity\Template'); |
308 | 308 | }; |
309 | - $app['eccube.repository.authority_role'] = function () use ($app) { |
|
309 | + $app['eccube.repository.authority_role'] = function() use ($app) { |
|
310 | 310 | return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole'); |
311 | 311 | }; |
312 | 312 | |
313 | - $app['paginator'] = $app->protect(function () { |
|
313 | + $app['paginator'] = $app->protect(function() { |
|
314 | 314 | $paginator = new \Knp\Component\Pager\Paginator(); |
315 | 315 | $paginator->subscribe(new \Eccube\EventListener\PaginatorListener()); |
316 | 316 | |
317 | 317 | return $paginator; |
318 | 318 | }); |
319 | 319 | |
320 | - $app['eccube.repository.help'] = function () use ($app) { |
|
320 | + $app['eccube.repository.help'] = function() use ($app) { |
|
321 | 321 | return $app['orm.em']->getRepository('Eccube\Entity\Help'); |
322 | 322 | }; |
323 | - $app['eccube.repository.plugin'] = function () use ($app) { |
|
323 | + $app['eccube.repository.plugin'] = function() use ($app) { |
|
324 | 324 | return $app['orm.em']->getRepository('Eccube\Entity\Plugin'); |
325 | 325 | }; |
326 | - $app['eccube.repository.plugin_event_handler'] = function () use ($app) { |
|
326 | + $app['eccube.repository.plugin_event_handler'] = function() use ($app) { |
|
327 | 327 | return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler'); |
328 | 328 | }; |
329 | - $app['eccube.repository.layout'] = function () use ($app) { |
|
329 | + $app['eccube.repository.layout'] = function() use ($app) { |
|
330 | 330 | return $app['orm.em']->getRepository('Eccube\Entity\Layout'); |
331 | 331 | }; |
332 | 332 | |
333 | - $app['request_scope'] = function () { |
|
333 | + $app['request_scope'] = function() { |
|
334 | 334 | return new ParameterBag(); |
335 | 335 | }; |
336 | 336 | // TODO 使用するか検討 |
337 | - $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) { |
|
337 | + $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) { |
|
338 | 338 | $compiler |
339 | 339 | ->addDebugInfo($node) |
340 | 340 | ->write("echo 'Helloooooo ' . ") |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | |
345 | 345 | }); |
346 | 346 | // TODO 使用するか検討 |
347 | - $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) { |
|
347 | + $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) { |
|
348 | 348 | $compiler |
349 | 349 | ->addDebugInfo($node) |
350 | 350 | ->write("echo 'jirooooooo ' . ") |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | }); |
356 | 356 | |
357 | 357 | // TODO 使用するか検討 |
358 | - $app['eccube.twig.generic_node_names'] = function () use ($app) { |
|
358 | + $app['eccube.twig.generic_node_names'] = function() use ($app) { |
|
359 | 359 | return [ |
360 | 360 | 'hello', |
361 | 361 | 'jiro', |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | }; |
365 | 365 | |
366 | 366 | // TODO 使用するか検討 |
367 | - $app['twig_parsers'] = function () use ($app) { |
|
367 | + $app['twig_parsers'] = function() use ($app) { |
|
368 | 368 | $GenericTokenParsers = []; |
369 | 369 | foreach ($app['eccube.twig.generic_node_names'] as $tagName) { |
370 | 370 | $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName); |
@@ -373,20 +373,20 @@ discard block |
||
373 | 373 | }; |
374 | 374 | |
375 | 375 | // TODO ServiceProvider から追加できるよう Collection にする |
376 | - $app['eccube.twig.block.templates'] = function () { |
|
376 | + $app['eccube.twig.block.templates'] = function() { |
|
377 | 377 | return [ |
378 | 378 | 'render_block.twig', |
379 | 379 | ]; |
380 | 380 | }; |
381 | 381 | |
382 | 382 | // Form\Type |
383 | - $app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
383 | + $app->extend('form.type.extensions', function($extensions) use ($app) { |
|
384 | 384 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
385 | 385 | $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension(); |
386 | 386 | $extensions[] = new \Eccube\Form\Extension\DoctrineOrmExtension($app['orm.em']); |
387 | 387 | return $extensions; |
388 | 388 | }); |
389 | - $app->extend('form.types', function ($types) use ($app) { |
|
389 | + $app->extend('form.types', function($types) use ($app) { |
|
390 | 390 | $types[] = new \Eccube\Form\Type\NameType($app['config']); |
391 | 391 | $types[] = new \Eccube\Form\Type\KanaType($app['config']); |
392 | 392 | $types[] = new \Eccube\Form\Type\TelType($app['config']); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | return $types; |
490 | 490 | }); |
491 | 491 | $app['eccube.entity.event.dispatcher']->addEventListener(new \Acme\Entity\SoldOutEventListener()); |
492 | - $app['eccube.queries'] = function () { |
|
492 | + $app['eccube.queries'] = function() { |
|
493 | 493 | return new \Eccube\Doctrine\Query\Queries(); |
494 | 494 | }; |
495 | 495 | // TODO QueryCustomizerの追加方法は要検討 |