@@ -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; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | if (!$this->baseInfoRepository->get()->isOptionProductTaxRule()) { |
| 165 | 165 | return; |
| 166 | 166 | } |
| 167 | - $builder->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
| 167 | + $builder->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
| 168 | 168 | $data = $event->getData(); |
| 169 | 169 | if (!$data instanceof ProductClass) { |
| 170 | 170 | return; |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | */ |
| 184 | 184 | protected function setCheckbox(FormBuilderInterface $builder) |
| 185 | 185 | { |
| 186 | - $builder->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
| 186 | + $builder->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
| 187 | 187 | $data = $event->getData(); |
| 188 | 188 | if (!$data instanceof ProductClass) { |
| 189 | 189 | return; |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | } |
| 195 | 195 | }); |
| 196 | 196 | |
| 197 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
| 197 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
| 198 | 198 | $form = $event->getForm(); |
| 199 | 199 | $data = $event->getData(); |
| 200 | 200 | $data->setVisible($form['checked']->getData() ? true : false); |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | protected function addValidations(FormBuilderInterface $builder) |
| 205 | 205 | { |
| 206 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
| 206 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
| 207 | 207 | $form = $event->getForm(); |
| 208 | 208 | $data = $form->getData(); |
| 209 | 209 | |
@@ -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 */ |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | ->add('class_name2', EntityType::class, [ |
| 32 | 32 | 'class' => ClassName::class, |
| 33 | 33 | 'placeholder' => '規格2を選択してください', |
| 34 | - 'constraints' => new Callback(function ( |
|
| 34 | + 'constraints' => new Callback(function( |
|
| 35 | 35 | ClassName $ClassName2 = null, |
| 36 | 36 | ExecutionContextInterface $context |
| 37 | 37 | ) { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ->add('save', SubmitType::class); |
| 55 | 55 | |
| 56 | 56 | if ($options['product_classes_exist']) { |
| 57 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
| 57 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
| 58 | 58 | $form = $event->getForm(); |
| 59 | 59 | $ProductClasses = $form['product_classes']->getData(); |
| 60 | 60 | $hasVisible = false; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | 'required' => false, |
| 176 | 176 | 'label' => 'shipping.label.shipping_company', |
| 177 | 177 | 'class' => 'Eccube\Entity\Delivery', |
| 178 | - 'choice_label' => function (Delivery $Delivery) { |
|
| 178 | + 'choice_label' => function(Delivery $Delivery) { |
|
| 179 | 179 | return $Delivery->isVisible() |
| 180 | 180 | ? $Delivery->getServiceName() |
| 181 | 181 | : $Delivery->getServiceName().trans('delivery.text.hidden'); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | 'required' => false, |
| 228 | 228 | 'data' => true, |
| 229 | 229 | ]) |
| 230 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
| 230 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
| 231 | 231 | /** @var \Eccube\Entity\Shipping $data */ |
| 232 | 232 | $data = $event->getData(); |
| 233 | 233 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | 'placeholder' => 'shipping.placeholder.not_specified', |
| 249 | 249 | 'required' => false, |
| 250 | 250 | 'data' => $DeliveryTime, |
| 251 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
| 251 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
| 252 | 252 | $qb = $er->createQueryBuilder('dt'); |
| 253 | 253 | if ($Delivery) { |
| 254 | 254 | $qb |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | 'mapped' => false, |
| 262 | 262 | ]); |
| 263 | 263 | }) |
| 264 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 264 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 265 | 265 | $data = $event->getData(); |
| 266 | 266 | $form = $event->getForm(); |
| 267 | 267 | |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | 'choice_label' => 'delivery_time', |
| 283 | 283 | 'placeholder' => 'shipping.placeholder.not_specified', |
| 284 | 284 | 'required' => false, |
| 285 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
| 285 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
| 286 | 286 | $qb = $er->createQueryBuilder('dt'); |
| 287 | 287 | if ($Delivery) { |
| 288 | 288 | $qb |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | 'mapped' => false, |
| 296 | 296 | ]); |
| 297 | 297 | }) |
| 298 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
| 298 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
| 299 | 299 | $form = $event->getForm(); |
| 300 | 300 | $Shipping = $event->getData(); |
| 301 | 301 | $Delivery = $Shipping->getDelivery(); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | 'label' => false, |
| 45 | 45 | 'class' => 'Eccube\Entity\Page', |
| 46 | 46 | 'choice_label' => 'name', |
| 47 | - 'query_builder' => function (EntityRepository $er) { |
|
| 47 | + 'query_builder' => function(EntityRepository $er) { |
|
| 48 | 48 | return $er |
| 49 | 49 | ->createQueryBuilder('l') |
| 50 | 50 | ->where('l.id <> 0') |