Completed
Push — support-coverage ( b5dae6...9a8e61 )
by Kentaro
55:48
created
src/Eccube/Controller/Admin/Product/CsvImportController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
 
194 194
                         return $this->render($form, $headers);
195 195
                     }
196
-                    $getId = function ($item) {
196
+                    $getId = function($item) {
197 197
                         return $item['id'];
198 198
                     };
199
-                    $requireHeader = array_keys(array_map($getId, array_filter($headers, function ($value) {
199
+                    $requireHeader = array_keys(array_map($getId, array_filter($headers, function($value) {
200 200
                         return $value['required'];
201 201
                     })));
202 202
 
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
             throw new NotFoundHttpException();
694 694
         }
695 695
 
696
-        $response->setCallback(function () use ($request, $headers) {
696
+        $response->setCallback(function() use ($request, $headers) {
697 697
             // ヘッダ行の出力
698 698
             $row = [];
699 699
             foreach ($headers as $key => $value) {
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Product/CategoryController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         $em->getConfiguration()->setSQLLogger(null);
289 289
 
290 290
         $response = new StreamedResponse();
291
-        $response->setCallback(function () use ($request) {
291
+        $response->setCallback(function() use ($request) {
292 292
             // CSV種別を元に初期化.
293 293
             $this->csvExportService->initCsvType(CsvType::CSV_TYPE_CATEGORY);
294 294
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
 
302 302
             // データ行の出力.
303 303
             $this->csvExportService->setExportQueryBuilder($qb);
304
-            $this->csvExportService->exportData(function ($entity, $csvService) use ($request) {
304
+            $this->csvExportService->exportData(function($entity, $csvService) use ($request) {
305 305
                 $Csvs = $csvService->getCsvs();
306 306
 
307 307
                 /** @var $Category \Eccube\Entity\Category */
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Content/FileController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -327,7 +327,7 @@
 block discarded – undo
327 327
     private function getFileList($nowDir)
328 328
     {
329 329
         $topDir = $this->getuserDataDir();
330
-        $filter = function (\SplFileInfo $file) use ($topDir) {
330
+        $filter = function(\SplFileInfo $file) use ($topDir) {
331 331
             $acceptPath = realpath($topDir);
332 332
             $targetPath = $file->getRealPath();
333 333
 
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Customer/CustomerController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
         $em->getConfiguration()->setSQLLogger(null);
299 299
 
300 300
         $response = new StreamedResponse();
301
-        $response->setCallback(function () use ($request) {
301
+        $response->setCallback(function() use ($request) {
302 302
             // CSV種別を元に初期化.
303 303
             $this->csvExportService->initCsvType(CsvType::CSV_TYPE_CUSTOMER);
304 304
 
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
             // データ行の出力.
313 313
             $this->csvExportService->setExportQueryBuilder($qb);
314
-            $this->csvExportService->exportData(function ($entity, $csvService) use ($request) {
314
+            $this->csvExportService->exportData(function($entity, $csvService) use ($request) {
315 315
                 $Csvs = $csvService->getCsvs();
316 316
 
317 317
                 /** @var $Customer \Eccube\Entity\Customer */
Please login to merge, or discard this patch.
src/Eccube/Controller/Admin/Order/OrderController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
         $em->getConfiguration()->setSQLLogger(null);
320 320
 
321 321
         $response = new StreamedResponse();
322
-        $response->setCallback(function () use ($request) {
322
+        $response->setCallback(function() use ($request) {
323 323
             // CSV種別を元に初期化.
324 324
             $this->csvExportService->initCsvType(CsvType::CSV_TYPE_ORDER);
325 325
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
             // データ行の出力.
334 334
             $this->csvExportService->setExportQueryBuilder($qb);
335
-            $this->csvExportService->exportData(function ($entity, $csvService) use ($request) {
335
+            $this->csvExportService->exportData(function($entity, $csvService) use ($request) {
336 336
                 $Csvs = $csvService->getCsvs();
337 337
 
338 338
                 $Order = $entity;
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         $em->getConfiguration()->setSQLLogger(null);
402 402
 
403 403
         $response = new StreamedResponse();
404
-        $response->setCallback(function () use ($request) {
404
+        $response->setCallback(function() use ($request) {
405 405
             // CSV種別を元に初期化.
406 406
             $this->csvExportService->initCsvType(CsvType::CSV_TYPE_SHIPPING);
407 407
 
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
 
415 415
             // データ行の出力.
416 416
             $this->csvExportService->setExportQueryBuilder($qb);
417
-            $this->csvExportService->exportData(function ($entity, $csvService) use ($request) {
417
+            $this->csvExportService->exportData(function($entity, $csvService) use ($request) {
418 418
                 /** @var Csv[] $Csvs */
419 419
                 $Csvs = $csvService->getCsvs();
420 420
 
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
@@ -877,7 +877,7 @@
 block discarded – undo
877 877
                 if ($dispatcher instanceof Response
878 878
                     && ($dispatcher->isRedirection() || $dispatcher->getContent())
879 879
                 ) { // $paymentMethod->apply() が Response を返した場合は画面遷移
880
-                    return $dispatcher;                // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御?
880
+                    return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御?
881 881
                 }
882 882
                 $PaymentResult = $paymentService->doCheckout($paymentMethod); // 決済実行
883 883
                 if (!$PaymentResult->isSuccess()) {
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/PurchaseFlowServiceProvider.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
 {
18 18
     public function register(Container $app)
19 19
     {
20
-        $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null, Customer $user = null) {
20
+        $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null, Customer $user = null) {
21 21
             return new PurchaseContext($origin, $user);
22 22
         });
23 23
 
24
-        $app['eccube.purchase.flow.cart.item_processors'] = function (Container $app) {
24
+        $app['eccube.purchase.flow.cart.item_processors'] = function(Container $app) {
25 25
             $processors = new ArrayCollection();
26 26
             $processors[] = new Processor\DisplayStatusValidator();
27 27
             $processors[] = new Processor\SaleLimitValidator();
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
             return $processors;
32 32
         };
33 33
 
34
-        $app['eccube.purchase.flow.cart.holder_processors'] = function (Container $app) {
34
+        $app['eccube.purchase.flow.cart.holder_processors'] = function(Container $app) {
35 35
             $processors = new ArrayCollection();
36 36
             $processors[] = new Processor\PaymentProcessor($app[DeliveryRepository::class]);
37 37
             $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']);
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             return $processors;
42 42
         };
43 43
 
44
-        $app['eccube.purchase.flow.cart'] = function (Container $app) {
44
+        $app['eccube.purchase.flow.cart'] = function(Container $app) {
45 45
             $flow = new PurchaseFlow();
46 46
             $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']);
47 47
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
             return $flow;
50 50
         };
51 51
 
52
-        $app['eccube.purchase.flow.shopping.item_processors'] = function (Container $app) {
52
+        $app['eccube.purchase.flow.shopping.item_processors'] = function(Container $app) {
53 53
             $processors = new ArrayCollection();
54 54
             $processors[] = new Processor\StockValidator();
55 55
             $processors[] = new Processor\DisplayStatusValidator();
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             return $processors;
58 58
         };
59 59
 
60
-        $app['eccube.purchase.flow.shopping.holder_processors'] = function (Container $app) {
60
+        $app['eccube.purchase.flow.shopping.holder_processors'] = function(Container $app) {
61 61
             $processors = new ArrayCollection();
62 62
             $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']);
63 63
             $processors[] = new Processor\DeliveryFeeProcessor($app['orm.em']);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             return $processors;
72 72
         };
73 73
 
74
-        $app['eccube.purchase.flow.shopping.purchase'] = function (Container $app) {
74
+        $app['eccube.purchase.flow.shopping.purchase'] = function(Container $app) {
75 75
             $processors = new ArrayCollection();
76 76
             if ($app[BaseInfo::class]->isOptionPoint()) {
77 77
                 $processors[] = new Processor\UsePointToCustomerPurchaseProcessor();
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             return $processors;
82 82
         };
83 83
 
84
-        $app['eccube.purchase.flow.shopping'] = function (Container $app) {
84
+        $app['eccube.purchase.flow.shopping'] = function(Container $app) {
85 85
             $flow = new PurchaseFlow();
86 86
             $flow->setItemProcessors($app['eccube.purchase.flow.shopping.item_processors']);
87 87
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.shopping.holder_processors']);
@@ -90,14 +90,14 @@  discard block
 block discarded – undo
90 90
             return $flow;
91 91
         };
92 92
 
93
-        $app['eccube.purchase.flow.order.item_processors'] = function (Container $app) {
93
+        $app['eccube.purchase.flow.order.item_processors'] = function(Container $app) {
94 94
             $processors = new ArrayCollection();
95 95
             $processors[] = new Processor\StockValidator();
96 96
 
97 97
             return $processors;
98 98
         };
99 99
 
100
-        $app['eccube.purchase.flow.order.holder_processors'] = function (Container $app) {
100
+        $app['eccube.purchase.flow.order.holder_processors'] = function(Container $app) {
101 101
             $processors = new ArrayCollection();
102 102
             $processors[] = new Processor\PaymentTotalLimitValidator($app['config']['max_total_fee']);
103 103
             $processors[] = new Processor\UpdateDatePurchaseProcessor($app['config']);
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
             return $processors;
111 111
         };
112 112
 
113
-        $app['eccube.purchase.flow.order.purchase'] = function (Container $app) {
113
+        $app['eccube.purchase.flow.order.purchase'] = function(Container $app) {
114 114
             $processors = new ArrayCollection();
115 115
             $processors[] = new Processor\AdminOrderRegisterPurchaseProcessor($app);
116 116
             $processors[] = new Processor\OrderCodePurchaseProcessor($app['orm.em'], $app['config']['order_code']);
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             return $processors;
119 119
         };
120 120
 
121
-        $app['eccube.purchase.flow.order'] = function (Container $app) {
121
+        $app['eccube.purchase.flow.order'] = function(Container $app) {
122 122
             $flow = new PurchaseFlow();
123 123
             $flow->setItemProcessors($app['eccube.purchase.flow.order.item_processors']);
124 124
             $flow->setItemHolderProcessors($app['eccube.purchase.flow.order.holder_processors']);
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/EccubePluginServiceProvider.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function register(Container $app)
23 23
     {
24 24
         // EventDispatcher
25
-        $app['eccube.event.dispatcher'] = function () use ($app) {
25
+        $app['eccube.event.dispatcher'] = function() use ($app) {
26 26
             return $app['dispatcher'];
27 27
         };
28 28
 
@@ -31,8 +31,8 @@  discard block
 block discarded – undo
31 31
 
32 32
         $enabledPlugins = $app['orm.em']->getRepository('Eccube\Entity\Plugin')->findAllEnabled();
33 33
 
34
-        $app['eccube.routers.plugin'] = function ($app) use ($enabledPlugins) {
35
-            $pluginDirs = array_map(function ($plugin) use ($app) {
34
+        $app['eccube.routers.plugin'] = function($app) use ($enabledPlugins) {
35
+            $pluginDirs = array_map(function($plugin) use ($app) {
36 36
                 return $app['config']['root_dir'].'/app/Plugin/'.$plugin->getCode();
37 37
             }, $enabledPlugins);
38 38
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             $config = $pluginConfig['config'];
59 59
 
60 60
             if (isset($config['const'])) {
61
-                $app->extend('config', function ($eccubeConfig) use ($config) {
61
+                $app->extend('config', function($eccubeConfig) use ($config) {
62 62
                     $eccubeConfig[$config['code']] = [
63 63
                         'const' => $config['const'],
64 64
                     ];
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     public function initPluginEventDispatcher(Application $app)
82 82
     {
83 83
         // hook point
84
-        $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) {
84
+        $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) {
85 85
             if (!$event->isMasterRequest()) {
86 86
                 return;
87 87
             }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
90 90
         }, Application::EARLY_EVENT);
91 91
 
92
-        $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) {
92
+        $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) {
93 93
             if (!$event->isMasterRequest()) {
94 94
                 return;
95 95
             }
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
99 99
         });
100 100
 
101
-        $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) {
101
+        $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) {
102 102
             if (!$event->isMasterRequest()) {
103 103
                 return;
104 104
             }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
108 108
         });
109 109
 
110
-        $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) {
110
+        $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) {
111 111
             if (!$event->isMasterRequest()) {
112 112
                 return;
113 113
             }
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
116 116
         }, Application::LATE_EVENT);
117 117
 
118
-        $app->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) {
118
+        $app->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) {
119 119
             $route = $event->getRequest()->attributes->get('_route');
120 120
             $hookpoint = "eccube.event.controller.$route.finish";
121 121
             $app['eccube.event.dispatcher']->dispatch($hookpoint, $event);
122 122
         });
123 123
 
124
-        $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
124
+        $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
125 125
             if (!$event->isMasterRequest()) {
126 126
                 return;
127 127
             }
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
         });
131 131
 
132 132
         // Request Event
133
-        $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) {
133
+        $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) {
134 134
             if (!$event->isMasterRequest()) {
135 135
                 return;
136 136
             }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         }, 30); // Routing(32)が解決し, 認証判定(8)が実行される前のタイミング.
160 160
 
161 161
         // Controller Event
162
-        $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
162
+        $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) {
163 163
             if (!$event->isMasterRequest()) {
164 164
                 return;
165 165
             }
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
         });
188 188
 
189 189
         // Response Event
190
-        $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
190
+        $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
191 191
             if (!$event->isMasterRequest()) {
192 192
                 return;
193 193
             }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         });
217 217
 
218 218
         // Exception Event
219
-        $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) {
219
+        $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) {
220 220
             if (!$event->isMasterRequest()) {
221 221
                 return;
222 222
             }
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         });
246 246
 
247 247
         // Terminate Event
248
-        $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) {
248
+        $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) {
249 249
             $route = $event->getRequest()->attributes->get('_route');
250 250
 
251 251
             if (is_null($route)) {
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/EccubeServiceProvider.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function register(Application $app)
35 35
     {
36
-        $app['orm.em'] = $app->share(function () use ($app) {
36
+        $app['orm.em'] = $app->share(function() use ($app) {
37 37
             return $app->getParentContainer()->get('doctrine')->getManager();
38 38
         });
39 39
 
40
-        $app['config'] = $app->share(function () use ($app) {
40
+        $app['config'] = $app->share(function() use ($app) {
41 41
             if ($app->getParentContainer()->has(EccubeConfig::class)) {
42 42
                 return $app->getParentContainer()->get(EccubeConfig::class);
43 43
             }
@@ -45,41 +45,41 @@  discard block
 block discarded – undo
45 45
             return [];
46 46
         });
47 47
 
48
-        $app['monolog.logger'] = $app->share(function () use ($app) {
48
+        $app['monolog.logger'] = $app->share(function() use ($app) {
49 49
             return $app->getParentContainer()->get('logger');
50 50
         });
51
-        $app['monolog'] = $app->share(function () use ($app) {
51
+        $app['monolog'] = $app->share(function() use ($app) {
52 52
             return $app['monolog.logger'];
53 53
         });
54
-        $app['eccube.logger'] = $app->share(function () use ($app) {
54
+        $app['eccube.logger'] = $app->share(function() use ($app) {
55 55
             return $app->getParentContainer()->get('eccube.logger');
56 56
         });
57 57
 
58
-        $app['session'] = $app->share(function () use ($app) {
58
+        $app['session'] = $app->share(function() use ($app) {
59 59
             return $app->getParentContainer()->get('session');
60 60
         });
61 61
 
62
-        $app['form.factory'] = $app->share(function () use ($app) {
62
+        $app['form.factory'] = $app->share(function() use ($app) {
63 63
             return $app->getParentContainer()->get('form.factory');
64 64
         });
65 65
 
66
-        $app['security'] = $app->share(function () use ($app) {
66
+        $app['security'] = $app->share(function() use ($app) {
67 67
             return $app->getParentContainer()->get('security.token_storage');
68 68
         });
69 69
 
70
-        $app['user'] = $app->share(function () use ($app) {
70
+        $app['user'] = $app->share(function() use ($app) {
71 71
             return $app['security']->getToken()->getUser();
72 72
         });
73 73
 
74
-        $app['dispatcher'] = $app->share(function () use ($app) {
74
+        $app['dispatcher'] = $app->share(function() use ($app) {
75 75
             return $app->getParentContainer()->get('event_dispatcher');
76 76
         });
77 77
 
78
-        $app['translator'] = $app->share(function () use ($app) {
78
+        $app['translator'] = $app->share(function() use ($app) {
79 79
             return $app->getParentContainer()->get('translator');
80 80
         });
81 81
 
82
-        $app['eccube.event.dispatcher'] = $app->share(function () use ($app) {
82
+        $app['eccube.event.dispatcher'] = $app->share(function() use ($app) {
83 83
             return $app['dispatcher'];
84 84
         });
85 85
     }
Please login to merge, or discard this patch.