Completed
Pull Request — experimental/3.1 (#2168)
by Kentaro
93:49 queued 72:21
created
src/Eccube/Form/Type/ShippingItemType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $app = $this->app;
50 50
 
51 51
         $builder
52
-            ->addEventListener(FormEvents::PRE_SET_DATA, function ($event) use ($app) {
52
+            ->addEventListener(FormEvents::PRE_SET_DATA, function($event) use ($app) {
53 53
                 /** @var \Eccube\Entity\Shipping $data */
54 54
                 $data = $event->getData();
55 55
                 /** @var \Symfony\Component\Form\Form $form */
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                         'placeholder' => '指定なし',
103 103
                     ));
104 104
             })
105
-            ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) {
105
+            ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) {
106 106
                 /** @var \Eccube\Entity\Shipping $data */
107 107
                 $data = $event->getData();
108 108
                 /** @var \Symfony\Component\Form\Form $form */
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                 }
119 119
 
120 120
             })
121
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
121
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
122 122
                 /** @var \Eccube\Entity\Shipping $data */
123 123
                 $data = $event->getData();
124 124
                 /** @var \Symfony\Component\Form\Form $form */
Please login to merge, or discard this patch.
src/Eccube/Form/Type/TelType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $builder->setAttribute('tel02_name', $options['tel02_name']);
80 80
         $builder->setAttribute('tel03_name', $options['tel03_name']);
81 81
         // todo 変
82
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function ($event) use ($builder) {
82
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function($event) use ($builder) {
83 83
             $form = $event->getForm();
84 84
             $count = 0;
85 85
             if ($form[$builder->getName().'01']->getData() != '') {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Install/Step3Type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,19 +147,19 @@
 block discarded – undo
147 147
                 'help' => 'メーラーバックエンドがSMTPかつSMTP-AUTH使用時のみ指定',
148 148
                 'required' => false,
149 149
             ))
150
-            ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use($app)  {
150
+            ->addEventListener(FormEvents::POST_SUBMIT, function($event) use($app)  {
151 151
                 $form = $event->getForm();
152 152
                 $data = $form->getData();
153 153
 
154 154
                 $ips = preg_split("/\R/", $data['admin_allow_hosts'], null, PREG_SPLIT_NO_EMPTY);
155 155
 
156
-                foreach($ips as $ip) {
156
+                foreach ($ips as $ip) {
157 157
                     $errors = $app['validator']->validate($ip, array(
158 158
                             new Assert\Ip(),
159 159
                         )
160 160
                     );
161 161
                     if ($errors->count() != 0) {
162
-                        $form['admin_allow_hosts']->addError(new FormError($ip . 'はIPv4アドレスではありません。'));
162
+                        $form['admin_allow_hosts']->addError(new FormError($ip.'はIPv4アドレスではありません。'));
163 163
                     }
164 164
                 }
165 165
             })
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Install/Step4Type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 'label' => 'パスワード',
95 95
                 'required' => false,
96 96
             ))
97
-            ->addEventListener(FormEvents::POST_SUBMIT, function ($event) {
97
+            ->addEventListener(FormEvents::POST_SUBMIT, function($event) {
98 98
                 $form = $event->getForm();
99 99
                 $data = $form->getData();
100 100
                 try {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                     $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
120 120
                     $conn->connect();
121 121
                 } catch (\Exception $e) {
122
-                    $form['database']->addError(new FormError('データベースに接続できませんでした。' . $e->getMessage()));
122
+                    $form['database']->addError(new FormError('データベースに接続できませんでした。'.$e->getMessage()));
123 123
                 }
124 124
             });
125 125
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
     public function validate($data, ExecutionContext $context, $param = null)
136 136
     {
137 137
         $parameters = $this->app['request_stack']->getCurrentRequest()->get('install_step4');
138
-        if ($parameters['database'] != 'pdo_sqlite'){
138
+        if ($parameters['database'] != 'pdo_sqlite') {
139 139
             $context->getValidator()->validate($data, array(
140 140
                 new Assert\NotBlank()
141 141
             ));
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Install/Step1Type.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 namespace Eccube\Form\Type\Install;
26 26
 
27 27
 use \Symfony\Component\Form\AbstractType;
28
-use \Symfony\Component\Form\Extension\Core\Type\CheckboxType;;
28
+use \Symfony\Component\Form\Extension\Core\Type\CheckboxType; ;
29 29
 use \Symfony\Component\Form\FormBuilderInterface;
30 30
 use \Symfony\Component\Validator\Constraints as Assert;
31 31
 
Please login to merge, or discard this patch.
src/Eccube/Twig/Extension/EccubeExtension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function getCsrfTokenForAnchor()
121 121
     {
122 122
         $token = $this->app['csrf.token_manager']->getToken(Constant::TOKEN_NAME)->getValue();
123
-        return 'token-for-anchor=\'' . $token . '\'';
123
+        return 'token-for-anchor=\''.$token.'\'';
124 124
     }
125 125
 
126 126
     /**
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
     public function getPriceFilter($number, $decimals = 0, $decPoint = '.', $thousandsSep = ',')
156 156
     {
157 157
         $price = number_format($number, $decimals, $decPoint, $thousandsSep);
158
-        $price = '¥ ' . $price;
158
+        $price = '¥ '.$price;
159 159
 
160 160
         return $price;
161 161
     }
Please login to merge, or discard this patch.
src/silex-doctrine-migrations/MigrationServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         $app['db.migrations.table_name'] = null;
26 26
         $app['db.migrations.name'] = null;
27 27
 
28
-        $app['dispatcher']->addListener(ConsoleEvents::INIT, function (ConsoleEvent $event) use ($app) {
28
+        $app['dispatcher']->addListener(ConsoleEvents::INIT, function(ConsoleEvent $event) use ($app) {
29 29
             $application = $event->getApplication();
30 30
 
31 31
             if (isset($app['orm.em'])) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderType.php 1 patch
Spacing   +10 added lines, -12 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
         /**
254 254
          * 複数配送オプション有効時の画面制御を行う.
255 255
          */
256
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($BaseInfo) {
256
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($BaseInfo) {
257 257
 
258 258
             if ($BaseInfo->getOptionMultipleShipping() != Constant::ENABLED) {
259 259
                 return;
@@ -263,17 +263,16 @@  discard block
 block discarded – undo
263 263
             $orderDetails = &$data['OrderDetails'];
264 264
 
265 265
             // 数量0フィルター
266
-            $quantityFilter = function ($v) {
266
+            $quantityFilter = function($v) {
267 267
                 return !(isset($v['quantity']) && preg_match('/^0+$/', trim($v['quantity'])));
268 268
             };
269 269
 
270 270
             $shippings = &$data['Shippings'];
271 271
 
272 272
             // 数量を抽出
273
-            $getQuantity = function ($v) {
273
+            $getQuantity = function($v) {
274 274
                 return (isset($v['quantity']) && preg_match('/^\d+$/', trim($v['quantity']))) ?
275
-                    trim($v['quantity']) :
276
-                    0;
275
+                    trim($v['quantity']) : 0;
277 276
             };
278 277
 
279 278
             foreach ($shippings as &$shipping) {
@@ -289,7 +288,7 @@  discard block
 block discarded – undo
289 288
                     $orderDetail['quantity'] = 0;
290 289
 
291 290
                     // 受注詳細と同じ商品規格のみ抽出
292
-                    $productClassFilter = function ($v) use ($orderDetail) {
291
+                    $productClassFilter = function($v) use ($orderDetail) {
293 292
                         return $orderDetail['ProductClass'] === $v['ProductClass'];
294 293
                     };
295 294
 
@@ -298,10 +297,9 @@  discard block
 block discarded – undo
298 297
                         if (!empty($shipping['ShipmentItems'])) {
299 298
 
300 299
                             // 同じ商品規格の受注詳細の価格を適用
301
-                            $applyPrice = function (&$v) use ($orderDetail) {
300
+                            $applyPrice = function(&$v) use ($orderDetail) {
302 301
                                 $v['price'] = ($v['ProductClass'] === $orderDetail['ProductClass']) ?
303
-                                    $orderDetail['price'] :
304
-                                    $v['price'];
302
+                                    $orderDetail['price'] : $v['price'];
305 303
                             };
306 304
                             array_walk($shipping['ShipmentItems'], $applyPrice);
307 305
 
@@ -322,7 +320,7 @@  discard block
 block discarded – undo
322 320
         });
323 321
 
324 322
         // 商品明細が追加されているかどうかを検証する
325
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
323
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
326 324
             $Order = $event->getData();
327 325
             if ($Order['OrderDetails']->isEmpty()) {
328 326
                 $form = $event->getForm();
@@ -330,7 +328,7 @@  discard block
 block discarded – undo
330 328
             }
331 329
         });
332 330
         // 選択された支払い方法の名称をエンティティにコピーする
333
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
331
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
334 332
             $Order = $event->getData();
335 333
             $Payment = $Order->getPayment();
336 334
             if (!is_null($Payment)) {
@@ -338,7 +336,7 @@  discard block
 block discarded – undo
338 336
             }
339 337
         });
340 338
         // 会員受注の場合、会員の性別/職業/誕生日をエンティティにコピーする
341
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
339
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
342 340
             $Order = $event->getData();
343 341
             $Customer = $Order->getCustomer();
344 342
             if (!is_null($Customer)) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ShippingType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
                 'format' => 'yyyy-MM-dd',
150 150
                 'required' => false,
151 151
             ))
152
-            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($BaseInfo) {
152
+            ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($BaseInfo) {
153 153
                 if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
154 154
                     $form = $event->getForm();
155 155
                     $form->add('ShipmentItems', CollectionType::class, array(
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
                     ));
161 161
                 }
162 162
             })
163
-            ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) {
163
+            ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) {
164 164
                 /** @var \Eccube\Entity\Shipping $data */
165 165
                 $data = $event->getData();
166 166
                 /** @var \Symfony\Component\Form\Form $form */
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
                     'choice_label' => 'delivery_time',
180 180
                     'placeholder' => '指定なし',
181 181
                     'required' => false,
182
-                    'query_builder' => function (EntityRepository $er) use($Delivery) {
182
+                    'query_builder' => function(EntityRepository $er) use($Delivery) {
183 183
                         return $er->createQueryBuilder('dt')
184 184
                             ->where('dt.Delivery = :Delivery')
185 185
                             ->setParameter('Delivery', $Delivery);
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 ));
188 188
 
189 189
             })
190
-            ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
190
+            ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
191 191
                 $data = $event->getData();
192 192
                 $form = $event->getForm();
193 193
                 if (!$data) {
@@ -207,14 +207,14 @@  discard block
 block discarded – undo
207 207
                     'choice_label' => 'delivery_time',
208 208
                     'placeholder' => '指定なし',
209 209
                     'required' => false,
210
-                    'query_builder' => function (EntityRepository $er) use($Delivery) {
210
+                    'query_builder' => function(EntityRepository $er) use($Delivery) {
211 211
                         return $er->createQueryBuilder('dt')
212 212
                             ->where('dt.Delivery = :Delivery')
213 213
                             ->setParameter('Delivery', $Delivery);
214 214
                     },
215 215
                 ));
216 216
             })
217
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($BaseInfo) {
217
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($BaseInfo) {
218 218
                 if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) {
219 219
                     $form = $event->getForm();
220 220
                     $shipmentItems = $form['ShipmentItems']->getData();
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
                     }
226 226
                 }
227 227
             })
228
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($BaseInfo) {
228
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($BaseInfo) {
229 229
                 $Shipping = $event->getData();
230 230
                 $Delivery = $Shipping->getDelivery();
231 231
                 $Shipping->setShippingDeliveryName($Delivery ? $Delivery : null);
Please login to merge, or discard this patch.