@@ -44,7 +44,7 @@ |
||
| 44 | 44 | 'choice_label' => 'method', |
| 45 | 45 | 'placeholder' => '-', |
| 46 | 46 | // fixme 何故かここはDESC |
| 47 | - 'query_builder' => function (EntityRepository $er) { |
|
| 47 | + 'query_builder' => function(EntityRepository $er) { |
|
| 48 | 48 | return $er->createQueryBuilder('m') |
| 49 | 49 | ->orderBy('m.sort_no', 'DESC'); |
| 50 | 50 | }, |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | 'class' => 'Eccube\Entity\Category', |
| 44 | 44 | 'choice_label' => 'NameWithLevel', |
| 45 | 45 | // なぜかDESC |
| 46 | - 'query_builder' => function (EntityRepository $er) { |
|
| 46 | + 'query_builder' => function(EntityRepository $er) { |
|
| 47 | 47 | return $er->createQueryBuilder('c') |
| 48 | 48 | ->orderBy('c.sort_no', 'DESC'); |
| 49 | 49 | }, |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | 'class' => 'Eccube\Entity\MailTemplate', |
| 43 | 43 | 'placeholder' => 'admin.setting.shop.mail.place_holder', |
| 44 | 44 | // なぜかsortNoを持っていない |
| 45 | - 'query_builder' => function (EntityRepository $er) { |
|
| 45 | + 'query_builder' => function(EntityRepository $er) { |
|
| 46 | 46 | return $er->createQueryBuilder('mt') |
| 47 | 47 | ->orderBy('mt.id', 'ASC'); |
| 48 | 48 | }, |
@@ -41,14 +41,14 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 43 | 43 | { |
| 44 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 44 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 45 | 45 | $options = $event->getForm()->getConfig()->getOptions(); |
| 46 | 46 | if (!$event->getData()) { |
| 47 | 47 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
| 48 | 48 | $event->setData($data); |
| 49 | 49 | } |
| 50 | 50 | }); |
| 51 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 51 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 52 | 52 | $options = $event->getForm()->getConfig()->getOptions(); |
| 53 | 53 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
| 54 | 54 | if (!in_array($event->getData(), $values)) { |
@@ -41,14 +41,14 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 43 | 43 | { |
| 44 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
| 44 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
| 45 | 45 | $options = $event->getForm()->getConfig()->getOptions(); |
| 46 | 46 | if (!$event->getData()) { |
| 47 | 47 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
| 48 | 48 | $event->setData($data); |
| 49 | 49 | } |
| 50 | 50 | }); |
| 51 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
| 51 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
| 52 | 52 | $options = $event->getForm()->getConfig()->getOptions(); |
| 53 | 53 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
| 54 | 54 | if (!in_array($event->getData(), $values)) { |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | public function buildForm(FormBuilderInterface $builder, array $options) |
| 57 | 57 | { |
| 58 | 58 | $builder |
| 59 | - ->addEventListener(FormEvents::POST_SET_DATA, function ($event) { |
|
| 59 | + ->addEventListener(FormEvents::POST_SET_DATA, function($event) { |
|
| 60 | 60 | /** @var \Eccube\Entity\OrderItem $data */ |
| 61 | 61 | $data = $event->getData(); |
| 62 | 62 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | $max = $this->eccubeConfig['eccube_price_max']; |
| 67 | 67 | $min = -$max; |
| 68 | 68 | |
| 69 | - $constraints = function (Options $options) use ($max, $min) { |
|
| 69 | + $constraints = function(Options $options) use ($max, $min) { |
|
| 70 | 70 | $constraints = []; |
| 71 | 71 | // requiredがtrueに指定されている場合, NotBlankを追加 |
| 72 | 72 | if (isset($options['required']) && true === $options['required']) { |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | // 配送業者のプルダウンを生成 |
| 68 | 68 | $builder->addEventListener( |
| 69 | 69 | FormEvents::PRE_SET_DATA, |
| 70 | - function (FormEvent $event) { |
|
| 70 | + function(FormEvent $event) { |
|
| 71 | 71 | /* @var Shipping $Shipping */ |
| 72 | 72 | $Shipping = $event->getData(); |
| 73 | 73 | if (is_null($Shipping) || !$Shipping->getId()) { |
@@ -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 | $Shipping = $event->getData(); |
| 114 | 114 | if (is_null($Shipping) || !$Shipping->getId()) { |
| 115 | 115 | return; |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | // お届け時間のプルダウンを生成 |
| 176 | 176 | $builder->addEventListener( |
| 177 | 177 | FormEvents::PRE_SET_DATA, |
| 178 | - function (FormEvent $event) { |
|
| 178 | + function(FormEvent $event) { |
|
| 179 | 179 | $Shipping = $event->getData(); |
| 180 | 180 | if (is_null($Shipping) || !$Shipping->getId()) { |
| 181 | 181 | return; |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | // POSTされないデータをエンティティにセットする. |
| 208 | 208 | // TODO Calculatorで行うのが適切. |
| 209 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
| 209 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
| 210 | 210 | $Shipping = $event->getData(); |
| 211 | 211 | $Delivery = $Shipping->getDelivery(); |
| 212 | 212 | |
@@ -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 される? |