@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | // 支払い方法のプルダウンを生成 |
110 | 110 | $builder->addEventListener( |
111 | 111 | FormEvents::PRE_SET_DATA, |
112 | - function (FormEvent $event) { |
|
112 | + function(FormEvent $event) { |
|
113 | 113 | /** @var Order $Order */ |
114 | 114 | $Order = $event->getData(); |
115 | 115 | if (is_null($Order) || !$Order->getId()) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | } |
118 | 118 | |
119 | 119 | // 受注明細に含まれる販売種別を抽出. |
120 | - $SaleTypes = array_reduce($Order->getOrderItems()->toArray(), function ($results, $OrderItem) { |
|
120 | + $SaleTypes = array_reduce($Order->getOrderItems()->toArray(), function($results, $OrderItem) { |
|
121 | 121 | /* @var OrderItem $OrderItem */ |
122 | 122 | $ProductClass = $OrderItem->getProductClass(); |
123 | 123 | if (!is_null($ProductClass)) { |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | EntityType::class, |
140 | 140 | [ |
141 | 141 | 'class' => 'Eccube\Entity\Payment', |
142 | - 'choice_label' => function ($Payment) { |
|
142 | + 'choice_label' => function($Payment) { |
|
143 | 143 | return $Payment->getMethod(); |
144 | 144 | }, |
145 | 145 | 'expanded' => true, |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | // TODO Calculatorで行うのが適切. |
159 | 159 | $builder->addEventListener( |
160 | 160 | FormEvents::POST_SUBMIT, |
161 | - function (FormEvent $event) { |
|
161 | + function(FormEvent $event) { |
|
162 | 162 | /** @var Order $Order */ |
163 | 163 | $Order = $event->getData(); |
164 | 164 | // XXX 非会員購入の際, use_point が null で submit される? |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $builder->setAttribute('tel02_name', $options['tel02_name']); |
94 | 94 | $builder->setAttribute('tel03_name', $options['tel03_name']); |
95 | 95 | // todo 変 |
96 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function ($event) use ($options) { |
|
96 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function($event) use ($options) { |
|
97 | 97 | $form = $event->getForm(); |
98 | 98 | $count = 0; |
99 | 99 | if ($form[$options['tel01_name']]->getData() != '') { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $app = $this->app; |
63 | 63 | |
64 | 64 | $builder |
65 | - ->addEventListener(FormEvents::PRE_SET_DATA, function ($event) { |
|
65 | + ->addEventListener(FormEvents::PRE_SET_DATA, function($event) { |
|
66 | 66 | /** @var \Eccube\Entity\Shipping $data */ |
67 | 67 | $data = $event->getData(); |
68 | 68 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | 'placeholder' => 'shippingitem.placeholder.not_selected', |
116 | 116 | ]); |
117 | 117 | }) |
118 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
118 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
119 | 119 | /** @var \Eccube\Entity\Shipping $data */ |
120 | 120 | $data = $event->getData(); |
121 | 121 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $form['shippingDeliveryDuration']->setData($shippingDeliveryDuration->format('Y/m/d')); |
131 | 131 | } |
132 | 132 | }) |
133 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
133 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
134 | 134 | $data = $event->getData(); |
135 | 135 | $form = $event->getForm(); |
136 | 136 | if (!$data) { |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | if (isset($data['deliveryTime'])) { |
151 | 151 | $value = $data['deliveryTime']; |
152 | - $filteredDeliveryTimes = $deliveryTimes->filter(function ($DeliveryTime) use ($value) { |
|
152 | + $filteredDeliveryTimes = $deliveryTimes->filter(function($DeliveryTime) use ($value) { |
|
153 | 153 | return $DeliveryTime->getId() == $value; |
154 | 154 | }); |
155 | 155 | if (!$filteredDeliveryTimes->count()) { |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | 'label' => 'お届け時間', |
174 | 174 | ]); |
175 | 175 | }) |
176 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
176 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
177 | 177 | /** @var \Eccube\Entity\Shipping $data */ |
178 | 178 | $data = $event->getData(); |
179 | 179 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($Product) { |
|
137 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($Product) { |
|
138 | 138 | $data = $event->getData(); |
139 | 139 | $form = $event->getForm(); |
140 | 140 | if (isset($data['classcategory_id1']) && !is_null($Product->getClassName2())) { |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | } |
149 | 149 | }); |
150 | 150 | |
151 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
151 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
152 | 152 | /** @var CartItem $CartItem */ |
153 | 153 | $CartItem = $event->getData(); |
154 | 154 | $ProductClass = $CartItem->getProductClass(); |
@@ -59,7 +59,7 @@ |
||
59 | 59 | ], |
60 | 60 | ]); |
61 | 61 | |
62 | - $builder->addEventListener(FormEvents::SUBMIT, function (FormEvent $event) { |
|
62 | + $builder->addEventListener(FormEvents::SUBMIT, function(FormEvent $event) { |
|
63 | 63 | $form = $event->getForm(); |
64 | 64 | $orderItemId = $form['id']->getData(); |
65 | 65 |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | |
186 | 186 | // XXX price を priceIncTax にセットし直す |
187 | 187 | // OrderItem::getTotalPrice でもやっているので、どこか一箇所にまとめたい |
188 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
188 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
189 | 189 | /** @var \Eccube\Entity\OrderItem $OrderItem */ |
190 | 190 | $OrderItem = $event->getData(); |
191 | 191 | $TaxDisplayType = $OrderItem->getTaxDisplayType(); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | |
207 | 207 | $event->setData($OrderItem); |
208 | 208 | }); |
209 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
209 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
210 | 210 | // モーダルからのPOST時に、金額等をセットする. |
211 | 211 | if ('modal' === $this->requestStack->getCurrentRequest()->get('modal')) { |
212 | 212 | $data = $event->getData(); |
@@ -282,17 +282,13 @@ discard block |
||
282 | 282 | $data['product_name'] = $Product->getName(); |
283 | 283 | $data['product_code'] = $ProductClass->getCode(); |
284 | 284 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
285 | - $ProductClass->getClassCategory1()->getClassName() : |
|
286 | - null; |
|
285 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
287 | 286 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
288 | - $ProductClass->getClassCategory2()->getClassName() : |
|
289 | - null; |
|
287 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
290 | 288 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
291 | - $ProductClass->getClassCategory1()->getName() : |
|
292 | - null; |
|
289 | + $ProductClass->getClassCategory1()->getName() : null; |
|
293 | 290 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
294 | - $ProductClass->getClassCategory2()->getName() : |
|
295 | - null; |
|
291 | + $ProductClass->getClassCategory2()->getName() : null; |
|
296 | 292 | $data['price'] = $ProductClass->getPrice02(); |
297 | 293 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
298 | 294 | $data['tax_type'] = TaxType::TAXATION; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | 'label' => 'authorityrole.label.denied_url', |
57 | 57 | 'required' => false, |
58 | 58 | ]) |
59 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
59 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
60 | 60 | $form = $event->getForm(); |
61 | 61 | |
62 | 62 | $Authority = $form['Authority']->getData(); |
@@ -82,7 +82,7 @@ |
||
82 | 82 | 'label' => 'paymentregister.label.commision', |
83 | 83 | ]) |
84 | 84 | ->add('fixed', HiddenType::class) |
85 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) { |
|
85 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) { |
|
86 | 86 | $form = $event->getForm(); |
87 | 87 | $ruleMax = $form['rule_max']->getData(); |
88 | 88 | $ruleMin = $form['rule_min']->getData(); |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | 'required' => false, |
178 | 178 | 'label' => 'PC', |
179 | 179 | 'class' => Layout::class, |
180 | - 'query_builder' => function (EntityRepository $er) { |
|
180 | + 'query_builder' => function(EntityRepository $er) { |
|
181 | 181 | $DeviceType = $this->deviceTypeRepository->find(DeviceType::DEVICE_TYPE_PC); |
182 | 182 | |
183 | 183 | return $er->createQueryBuilder('l') |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | 'required' => false, |
193 | 193 | 'label' => 'mainedit.label.smartphone', |
194 | 194 | 'class' => Layout::class, |
195 | - 'query_builder' => function (EntityRepository $er) { |
|
195 | + 'query_builder' => function(EntityRepository $er) { |
|
196 | 196 | $DeviceType = $this->deviceTypeRepository->find(DeviceType::DEVICE_TYPE_SP); |
197 | 197 | |
198 | 198 | return $er->createQueryBuilder('l') |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | ->orderBy('l.id', 'DESC'); |
202 | 202 | }, |
203 | 203 | ]) |
204 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
204 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
205 | 205 | $Page = $event->getData(); |
206 | 206 | if (is_null($Page->getId())) { |
207 | 207 | return; |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | } |
218 | 218 | } |
219 | 219 | }) |
220 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
220 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
221 | 221 | $form = $event->getForm(); |
222 | 222 | |
223 | 223 | /** @var Page $Page */ |