Failed Conditions
Push — experimental/3.1 ( 243c6b...0c67c0 )
by Yangsin
65:47
created
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.
src/Eccube/Application/ApplicationTrait.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,32 +19,32 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function addSuccess($message, $namespace = 'front')
21 21
     {
22
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message);
22
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message);
23 23
     }
24 24
 
25 25
     public function addError($message, $namespace = 'front')
26 26
     {
27
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message);
27
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message);
28 28
     }
29 29
 
30 30
     public function addDanger($message, $namespace = 'front')
31 31
     {
32
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message);
32
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message);
33 33
     }
34 34
 
35 35
     public function addWarning($message, $namespace = 'front')
36 36
     {
37
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message);
37
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message);
38 38
     }
39 39
 
40 40
     public function addInfo($message, $namespace = 'front')
41 41
     {
42
-        $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message);
42
+        $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message);
43 43
     }
44 44
 
45 45
     public function addRequestError($message, $namespace = 'front')
46 46
     {
47
-        $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message);
47
+        $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message);
48 48
     }
49 49
 
50 50
     public function clearMessage()
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if (is_null($namespace)) {
64 64
             $this['session']->getFlashBag()->set('eccube.login.target.path', $targetPath);
65 65
         } else {
66
-            $this['session']->getFlashBag()->set('eccube.' . $namespace . '.login.target.path', $targetPath);
66
+            $this['session']->getFlashBag()->set('eccube.'.$namespace.'.login.target.path', $targetPath);
67 67
         }
68 68
     }
69 69
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param Response $response
112 112
      * @return Application
113 113
      */
114
-    public function forwardChain($path, array $requestParameters = [], Response &$response = null)
114
+    public function forwardChain($path, array $requestParameters = [], Response&$response = null)
115 115
     {
116 116
         $response = $this->forward($path, $requestParameters);
117 117
         return $this;
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Setting/System/SystemController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,13 +58,13 @@
 block discarded – undo
58 58
         $system = $app['eccube.service.system'];
59 59
 
60 60
         $arrSystemInfo = array(
61
-            array('title' => 'EC-CUBE',     'value' => Constant::VERSION),
62
-            array('title' => 'サーバーOS',    'value' => php_uname()),
63
-            array('title' => 'DBサーバー',    'value' => $system->getDbversion()),
64
-            array('title' => 'WEBサーバー',   'value' => $request->server->get("SERVER_SOFTWARE")),
61
+            array('title' => 'EC-CUBE', 'value' => Constant::VERSION),
62
+            array('title' => 'サーバーOS', 'value' => php_uname()),
63
+            array('title' => 'DBサーバー', 'value' => $system->getDbversion()),
64
+            array('title' => 'WEBサーバー', 'value' => $request->server->get("SERVER_SOFTWARE")),
65 65
         );
66 66
 
67
-        $value = phpversion() . ' (' . implode(', ', get_loaded_extensions()) . ')';
67
+        $value = phpversion().' ('.implode(', ', get_loaded_extensions()).')';
68 68
         $arrSystemInfo[] = array('title' => 'PHP', 'value' => $value);
69 69
         $arrSystemInfo[] = array('title' => 'HTTPユーザーエージェント', 'value' => $request->headers->get('User-Agent'));
70 70
 
Please login to merge, or discard this patch.
src/Eccube/Controller/ShoppingController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1336,7 +1336,7 @@
 block discarded – undo
1336 1336
                 // ステータス履歴も保持しておく? 在庫引き当ての仕様もセットで。
1337 1337
                 if ($dispatcher instanceof Response
1338 1338
                     && ($dispatcher->isRedirection() || $dispatcher->getContent())) { // $paymentMethod->apply() が Response を返した場合は画面遷移
1339
-                    return $dispatcher;                // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御?
1339
+                    return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御?
1340 1340
                 }
1341 1341
                 $PaymentResult = $paymentService->doCheckout($paymentMethod); // 決済実行
1342 1342
                 if (!$PaymentResult->isSuccess()) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ShipmentItemType.php 1 patch
Spacing   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
                 )));
97 97
 
98 98
         $app = $this->app;
99
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
99
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
100 100
             // モーダルからのPOST時に、金額等をセットする.
101 101
             if ('modal' === $app['request_stack']->getCurrentRequest()->get('modal')) {
102 102
                 $data = $event->getData();
@@ -111,17 +111,13 @@  discard block
 block discarded – undo
111 111
                     $data['product_name'] = $Product->getName();
112 112
                     $data['product_code'] = $ProductClass->getCode();
113 113
                     $data['class_name1'] = $ProductClass->hasClassCategory1() ?
114
-                        $ProductClass->getClassCategory1()->getClassName() :
115
-                        null;
114
+                        $ProductClass->getClassCategory1()->getClassName() : null;
116 115
                     $data['class_name2'] = $ProductClass->hasClassCategory2() ?
117
-                        $ProductClass->getClassCategory2()->getClassName() :
118
-                        null;
116
+                        $ProductClass->getClassCategory2()->getClassName() : null;
119 117
                     $data['class_category_name1'] = $ProductClass->hasClassCategory1() ?
120
-                        $ProductClass->getClassCategory1()->getName() :
121
-                        null;
118
+                        $ProductClass->getClassCategory1()->getName() : null;
122 119
                     $data['class_category_name2'] = $ProductClass->hasClassCategory2() ?
123
-                        $ProductClass->getClassCategory2()->getName() :
124
-                        null;
120
+                        $ProductClass->getClassCategory2()->getName() : null;
125 121
                     $data['price'] = $ProductClass->getPrice02();
126 122
                     $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity'];
127 123
                     $event->setData($data);
Please login to merge, or discard this patch.
src/Eccube/Form/Type/ShippingMultipleItemType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                     new Assert\Regex(array('pattern' => '/^\d+$/')),
67 67
                 ),
68 68
             ))
69
-            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($app) {
69
+            ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($app) {
70 70
                 $form = $event->getForm();
71 71
 
72 72
                 if ($app->isGranted('IS_AUTHENTICATED_FULLY')) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                     $form->add('customer_address', EntityType::class, array(
76 76
                         'class' => 'Eccube\Entity\CustomerAddress',
77 77
                         'choice_label' => 'shippingMultipleDefaultName',
78
-                        'query_builder' => function (EntityRepository $er) use ($Customer) {
78
+                        'query_builder' => function(EntityRepository $er) use ($Customer) {
79 79
                             return $er->createQueryBuilder('ca')
80 80
                                 ->where('ca.Customer = :Customer')
81 81
                                 ->orderBy("ca.id", "ASC")
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
                     }
108 108
                 }
109 109
             })
110
-            ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) {
110
+            ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) {
111 111
                 /** @var \Eccube\Entity\Shipping $data */
112 112
                 $data = $event->getData();
113 113
                 /** @var \Symfony\Component\Form\Form $form */
Please login to merge, or discard this patch.
src/Eccube/Controller/AbstractController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         @trigger_error('The '.__METHOD__.' method is deprecated.', E_USER_DEPRECATED);
46 46
 
47 47
         $form = $app['form.factory']
48
-            ->createBuilder($app['eccube.form.type.' . $type], $app['eccube.entity.' . $type])
48
+            ->createBuilder($app['eccube.form.type.'.$type], $app['eccube.entity.'.$type])
49 49
             ->getForm();
50 50
         $form->handleRequest($app['request_stack']->getCurrentRequest());
51 51
 
Please login to merge, or discard this patch.