Failed Conditions
Pull Request — experimental/3.1 (#2374)
by Kentaro
29:44
created
app/Plugin/EntityEvent/ServiceProvider/EntityEventServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function register(Container $app)
14 14
     {
15
-        $app['plugin.entity_event.base_info_listener'] = function (Container $container) {
15
+        $app['plugin.entity_event.base_info_listener'] = function(Container $container) {
16 16
             return new BaseInfoListener();
17 17
         };
18 18
     }
Please login to merge, or discard this patch.
app/Plugin/QueryCustomize/ServiceProvider/QueryCustomizeServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function register(Container $app)
14 14
     {
15
-        $app['plugin.query_customize.customer_search'] = function (Container $container) {
15
+        $app['plugin.query_customize.customer_search'] = function(Container $container) {
16 16
             return new AdminCustomerCustomizer();
17 17
         };
18 18
     }
Please login to merge, or discard this patch.
src/Eccube/Application.php 1 patch
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $this->register(new \Saxulum\Validator\Provider\SaxulumValidatorProvider());
168 168
         $this->register(new MobileDetectServiceProvider());
169 169
 
170
-        $this->error(function (\Exception $e, Request $request, $code) {
170
+        $this->error(function(\Exception $e, Request $request, $code) {
171 171
             if ($this['debug']) {
172 172
                 return;
173 173
             }
@@ -261,14 +261,14 @@  discard block
 block discarded – undo
261 261
             return $router;
262 262
         });
263 263
 
264
-        $this['eccube.router.origin'] = function ($app) {
264
+        $this['eccube.router.origin'] = function($app) {
265 265
             $resource = __DIR__.'/Controller';
266 266
             $cachePrefix = 'Origin';
267 267
 
268 268
             return $app['eccube.router']($resource, $cachePrefix);
269 269
         };
270 270
 
271
-        $this['eccube.routers.plugin'] = function ($app) {
271
+        $this['eccube.routers.plugin'] = function($app) {
272 272
             // TODO 有効なプラグインを対象とする必要がある.
273 273
             $dirs = Finder::create()
274 274
                 ->in($app['config']['root_dir'].'/app/Plugin')
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             return $routers;
286 286
         };
287 287
 
288
-        $this['eccube.router.extend'] = function ($app) {
288
+        $this['eccube.router.extend'] = function($app) {
289 289
             // TODO ディレクトリ名は暫定
290 290
             $resource = $app['config']['root_dir'].'/app/Acme/Controller';
291 291
             $cachePrefix = 'Extend';
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             return $router;
296 296
         };
297 297
 
298
-        $this->extend('request_matcher', function ($matcher, $app) {
298
+        $this->extend('request_matcher', function($matcher, $app) {
299 299
             $matchers = [];
300 300
             $matchers[] = $app['eccube.router.extend'];
301 301
             foreach ($app['eccube.routers.plugin'] as $router) {
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
             return new ChainUrlMatcher($matchers, $app['request_context']);
308 308
         });
309 309
 
310
-        $this->extend('url_generator', function ($generator, $app) {
310
+        $this->extend('url_generator', function($generator, $app) {
311 311
             $generators = [];
312 312
             $generators[] = $app['eccube.router.extend'];
313 313
             foreach ($app['eccube.routers.plugin'] as $router) {
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
         });
321 321
 
322 322
         // Route CollectionにEC-CUBEで定義したルーティングを追加(debug tool barに出力するため)
323
-        $this->extend('routes', function ($routes, $app) {
323
+        $this->extend('routes', function($routes, $app) {
324 324
             $routes->addCollection($app['eccube.router.extend']->getRouteCollection());
325 325
             foreach ($app['eccube.routers.plugin'] as $router) {
326 326
                 $routes->addCollection($router->getRouteCollection());
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
             'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator',
350 350
             'locale_fallbacks' => ['ja', 'en'],
351 351
         ));
352
-        $this->extend('translator', function ($translator, \Silex\Application $app) {
352
+        $this->extend('translator', function($translator, \Silex\Application $app) {
353 353
             $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader());
354 354
 
355 355
             $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml';
@@ -396,14 +396,14 @@  discard block
 block discarded – undo
396 396
         $this->register(new \Silex\Provider\TwigServiceProvider(), array(
397 397
             'twig.form.templates' => array('Form/form_layout.twig'),
398 398
         ));
399
-        $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) {
399
+        $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) {
400 400
             $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app));
401 401
             $twig->addExtension(new \Twig_Extension_StringLoader());
402 402
 
403 403
             return $twig;
404 404
         });
405 405
 
406
-        $this->before(function (Request $request, \Silex\Application $app) {
406
+        $this->before(function(Request $request, \Silex\Application $app) {
407 407
             $app['admin'] = $app['front'] = false;
408 408
             $pathinfo = rawurldecode($request->getPathInfo());
409 409
             if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) {
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
                 }
420 420
                 $paths[] = $app['config']['template_admin_realdir'];
421 421
                 $paths[] = __DIR__.'/../../app/Plugin';
422
-                $cacheDir =  __DIR__.'/../../app/cache/twig/admin';
422
+                $cacheDir = __DIR__.'/../../app/cache/twig/admin';
423 423
             } else {
424 424
                 // モバイル端末時、smartphoneディレクトリを探索パスに追加する.
425 425
                 if ($app['mobile_detect.device_type'] == \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP) {
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
                 }
435 435
                 $paths[] = $app['config']['template_default_realdir'];
436 436
                 $paths[] = __DIR__.'/../../app/Plugin';
437
-                $cacheDir =  __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
437
+                $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code'];
438 438
             }
439 439
             $app['twig']->setCache($app['debug'] ? null : $cacheDir);
440 440
             $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths));
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
         }, self::EARLY_EVENT);
453 453
 
454 454
         // twigのグローバル変数を定義.
455
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
455
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) {
456 456
             // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため,
457 457
             // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う
458 458
             if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) {
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
         // メール送信時の文字エンコード指定(デフォルトはUTF-8)
539 539
         if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) {
540 540
             if ($this['config']['mail']['charset_iso_2022_jp'] === true) {
541
-                \Swift::init(function () {
541
+                \Swift::init(function() {
542 542
                     \Swift_DependencyContainer::getInstance()
543 543
                         ->register('mime.qpheaderencoder')
544 544
                         ->asAliasOf('mime.base64headerencoder');
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
         $this->register(new \Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider());
574 574
 
575 575
         $app = $this;
576
-        $this->extend('db.event_manager', function ($evm) use ($app) {
576
+        $this->extend('db.event_manager', function($evm) use ($app) {
577 577
             $initSubscriber = new InitSubscriber($app);
578 578
             $evm->addEventSubscriber($initSubscriber);
579 579
 
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 
669 669
         $this->extend(
670 670
             'orm.em.config',
671
-            function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
671
+            function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
672 672
 
673 673
                 /** @var $chain \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain */
674 674
                 $chain = $config->getMetadataDriverImpl();
@@ -690,7 +690,7 @@  discard block
 block discarded – undo
690 690
             }
691 691
         );
692 692
 
693
-        $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
693
+        $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) {
694 694
             // tax_rule
695 695
             $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule');
696 696
             $taxRuleRepository->setApplication($app);
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
             // second level cacheの設定.
720 720
             $this->extend(
721 721
                 'orm.em.config',
722
-                function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
722
+                function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) {
723 723
                     $config->setSecondLevelCacheEnabled();
724 724
                     $cacheConfig = $config->getSecondLevelCacheConfiguration();
725 725
                     $regionConfig = $cacheConfig->getRegionsConfiguration();
@@ -808,31 +808,31 @@  discard block
 block discarded – undo
808 808
             array('^/mypage', 'ROLE_USER', $channel),
809 809
         );
810 810
 
811
-        $this['eccube.password_encoder'] = function ($app) {
811
+        $this['eccube.password_encoder'] = function($app) {
812 812
             return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']);
813 813
         };
814
-        $this['security.encoder_factory'] = function ($app) {
814
+        $this['security.encoder_factory'] = function($app) {
815 815
             return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array(
816 816
                 'Eccube\Entity\Customer' => $app['eccube.password_encoder'],
817 817
                 'Eccube\Entity\Member' => $app['eccube.password_encoder'],
818 818
             ));
819 819
         };
820
-        $this['eccube.event_listner.security'] = function ($app) {
820
+        $this['eccube.event_listner.security'] = function($app) {
821 821
             return new \Eccube\EventListener\SecurityEventListener($app['orm.em']);
822 822
         };
823 823
 
824 824
         // Voterの設定
825
-        $this['authority_voter'] = function ($app) {
825
+        $this['authority_voter'] = function($app) {
826 826
             return new \Eccube\Security\Voter\AuthorityVoter($app);
827 827
         };
828 828
 
829
-        $this->extend('security.voters', function ($voters, \Silex\Application $app) {
829
+        $this->extend('security.voters', function($voters, \Silex\Application $app) {
830 830
             $voters[] = $app['authority_voter'];
831 831
 
832 832
             return $voters;
833 833
         });
834 834
 
835
-        $this['security.access_manager'] = function ($app) {
835
+        $this['security.access_manager'] = function($app) {
836 836
             return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous');
837 837
         };
838 838
 
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
     {
847 847
         $config = $this['config'];
848 848
         if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) {
849
-            $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) {
849
+            $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) {
850 850
                 // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する
851 851
                 Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies']));
852 852
             }, self::EARLY_EVENT);
@@ -863,7 +863,7 @@  discard block
 block discarded – undo
863 863
         $this->register(new ServiceProvider\EccubePluginServiceProvider());
864 864
 
865 865
         // TODO Acme\ServiceProvider の初期化はここで OK?
866
-        if (array_key_exists('service',$this['config'])) {
866
+        if (array_key_exists('service', $this['config'])) {
867 867
             foreach ($this['config']['service'] as $service) {
868 868
                 $this->register(new $service);
869 869
             }
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
         $app = $this;
1020 1020
 
1021 1021
         // Response Event(http cache対応、event実行は一番遅く設定)
1022
-        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1022
+        $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) {
1023 1023
 
1024 1024
             if (!$event->isMasterRequest()) {
1025 1025
                 return;
Please login to merge, or discard this patch.
src/Eccube/Command/RouterCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
             if (strtoupper($orderby) === "PATH") {
95 95
                 uasort(
96 96
                     $routes,
97
-                    function ($a, $b) {
97
+                    function($a, $b) {
98 98
                         return strcmp($a->getPath(), $b->getPath());
99 99
                     }
100 100
                 );
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/ShipmentItemType.php 1 patch
Spacing   +6 added lines, -10 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         $app = $this->app;
146 146
         // XXX price を priceIncTax にセットし直す
147 147
         // ShipmentItem::getTotalPrice でもやっているので、どこか一箇所にまとめたい
148
-        $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($app) {
148
+        $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($app) {
149 149
                 /** @var \Eccube\Entity\ShipmentItem $ShipmentItem */
150 150
                 $ShipmentItem = $event->getData();
151 151
                 $TaxDisplayType = $ShipmentItem->getTaxDisplayType();
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
                 $event->setData($ShipmentItem);
165 165
         });
166
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
166
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
167 167
             // モーダルからのPOST時に、金額等をセットする.
168 168
             if ('modal' === $app['request_stack']->getCurrentRequest()->get('modal')) {
169 169
                 $data = $event->getData();
@@ -233,17 +233,13 @@  discard block
 block discarded – undo
233 233
                                 $data['product_name'] = $Product->getName();
234 234
                                 $data['product_code'] = $ProductClass->getCode();
235 235
                                 $data['class_name1'] = $ProductClass->hasClassCategory1() ?
236
-                                    $ProductClass->getClassCategory1()->getClassName() :
237
-                                    null;
236
+                                    $ProductClass->getClassCategory1()->getClassName() : null;
238 237
                                 $data['class_name2'] = $ProductClass->hasClassCategory2() ?
239
-                                    $ProductClass->getClassCategory2()->getClassName() :
240
-                                    null;
238
+                                    $ProductClass->getClassCategory2()->getClassName() : null;
241 239
                                 $data['class_category_name1'] = $ProductClass->hasClassCategory1() ?
242
-                                    $ProductClass->getClassCategory1()->getName() :
243
-                                    null;
240
+                                    $ProductClass->getClassCategory1()->getName() : null;
244 241
                                 $data['class_category_name2'] = $ProductClass->hasClassCategory2() ?
245
-                                    $ProductClass->getClassCategory2()->getName() :
246
-                                    null;
242
+                                    $ProductClass->getClassCategory2()->getName() : null;
247 243
                                 $data['price'] = $ProductClass->getPrice02();
248 244
                                 $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity'];
249 245
                                 $data['tax_type'] = TaxType::TAXATION;
Please login to merge, or discard this patch.
app/Plugin/Strategy/ServiceProvider/StrategyServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
     public function register(Container $app)
13 13
     {
14 14
         // サンプルの空Strategyをコンテナに登録
15
-        $app['eccube.calculate.strategy.empty'] = function () {
15
+        $app['eccube.calculate.strategy.empty'] = function() {
16 16
             return new EmptyStrategy();
17 17
         };
18 18
 
19 19
         // 空Strategyを追加.
20 20
         $app->extend(
21 21
             'eccube.calculate.strategies',
22
-            function (CalculateStrategyCollection $Collection, Container $app) {
22
+            function(CalculateStrategyCollection $Collection, Container $app) {
23 23
                 $Collection->add($app['eccube.calculate.strategy.empty']);
24 24
 
25 25
                 return $Collection;
Please login to merge, or discard this patch.
src/Eccube/ServiceProvider/EccubeServiceProvider.php 1 patch
Spacing   +84 added lines, -84 removed lines patch added patch discarded remove patch
@@ -45,31 +45,31 @@  discard block
 block discarded – undo
45 45
     public function register(Container $app)
46 46
     {
47 47
         // Service
48
-        $app['eccube.service.system'] = function () use ($app) {
48
+        $app['eccube.service.system'] = function() use ($app) {
49 49
             return new \Eccube\Service\SystemService($app);
50 50
         };
51
-        $app['view'] = function () use ($app) {
51
+        $app['view'] = function() use ($app) {
52 52
             return $app['twig'];
53 53
         };
54
-        $app['eccube.service.cart'] = function () use ($app) {
54
+        $app['eccube.service.cart'] = function() use ($app) {
55 55
             return new \Eccube\Service\CartService($app);
56 56
         };
57
-        $app['eccube.service.order'] = function () use ($app) {
57
+        $app['eccube.service.order'] = function() use ($app) {
58 58
             return new \Eccube\Service\OrderService($app);
59 59
         };
60
-        $app['eccube.service.tax_rule'] = function () use ($app) {
60
+        $app['eccube.service.tax_rule'] = function() use ($app) {
61 61
             return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']);
62 62
         };
63
-        $app['eccube.service.plugin'] = function () use ($app) {
63
+        $app['eccube.service.plugin'] = function() use ($app) {
64 64
             return new \Eccube\Service\PluginService($app);
65 65
         };
66
-        $app['eccube.service.mail'] = function () use ($app) {
66
+        $app['eccube.service.mail'] = function() use ($app) {
67 67
             return new \Eccube\Service\MailService($app);
68 68
         };
69
-        $app['eccube.calculate.context'] = function () use ($app) {
69
+        $app['eccube.calculate.context'] = function() use ($app) {
70 70
                 return new \Eccube\Service\Calculator\CalculateContext();
71 71
         };
72
-        $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) {
72
+        $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) {
73 73
                 $Service = new \Eccube\Service\CalculateService($Order, $Customer);
74 74
                 $Context = $app['eccube.calculate.context'];
75 75
                 $app['eccube.calculate.strategies']->setOrder($Order);
@@ -79,13 +79,13 @@  discard block
 block discarded – undo
79 79
                 return $Service;
80 80
         });
81 81
 
82
-        $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) {
82
+        $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) {
83 83
                 $Service = new $clazz;
84 84
                 $Service->setApplication($app);
85 85
                 return $Service;
86 86
         });
87 87
 
88
-        $app['eccube.calculate.strategies'] = function () use ($app) {
88
+        $app['eccube.calculate.strategies'] = function() use ($app) {
89 89
             $Collection = new \Eccube\Service\Calculator\CalculateStrategyCollection();
90 90
             $Collection->setApplication($app);
91 91
             //$Collection->setOrder($Order);
@@ -98,47 +98,47 @@  discard block
 block discarded – undo
98 98
             $Collection->add($app['eccube.calculate.strategy.calculate_total']);
99 99
             return $Collection;
100 100
         };
101
-        $app['eccube.calculate.strategy.shipping'] = function () use ($app) {
101
+        $app['eccube.calculate.strategy.shipping'] = function() use ($app) {
102 102
                 $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy();
103 103
                 $Strategy->setApplication($app);
104 104
                 return $Strategy;
105 105
         };
106
-        $app['eccube.calculate.strategy.charge'] = function () use ($app) {
106
+        $app['eccube.calculate.strategy.charge'] = function() use ($app) {
107 107
                 $Strategy = new \Eccube\Service\Calculator\Strategy\ChargeStrategy();
108 108
                 $Strategy->setApplication($app);
109 109
                 return $Strategy;
110 110
         };
111 111
 
112
-        $app['eccube.calculate.strategy.tax'] = function () use ($app) {
112
+        $app['eccube.calculate.strategy.tax'] = function() use ($app) {
113 113
                 $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy();
114 114
                 $Strategy->setApplication($app);
115 115
                 return $Strategy;
116 116
         };
117 117
 
118
-        $app['eccube.calculate.strategy.calculate_delivery_fee'] = function () use ($app) {
118
+        $app['eccube.calculate.strategy.calculate_delivery_fee'] = function() use ($app) {
119 119
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateDeliveryFeeStrategy();
120 120
             $Strategy->setApplication($app);
121 121
             return $Strategy;
122 122
         };
123
-        $app['eccube.calculate.strategy.calculate_charge'] = function () use ($app) {
123
+        $app['eccube.calculate.strategy.calculate_charge'] = function() use ($app) {
124 124
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateChargeStrategy();
125 125
             $Strategy->setApplication($app);
126 126
             return $Strategy;
127 127
         };
128
-        $app['eccube.calculate.strategy.calculate_total'] = function () use ($app) {
128
+        $app['eccube.calculate.strategy.calculate_total'] = function() use ($app) {
129 129
             $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateTotalStrategy();
130 130
             $Strategy->setApplication($app);
131 131
             return $Strategy;
132 132
         };
133 133
 
134
-        $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) {
134
+        $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) {
135 135
                 $PaymentMethod = new $clazz;
136 136
                 $PaymentMethod->setApplication($app);
137 137
                 $PaymentMethod->setFormType($form);
138 138
                 return $PaymentMethod;
139 139
         });
140 140
 
141
-        $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) {
141
+        $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) {
142 142
                 $PaymentMethod = new $clazz;
143 143
                 $PaymentMethod->setApplication($app);
144 144
                 $PaymentMethod->setFormType($form);
@@ -146,11 +146,11 @@  discard block
 block discarded – undo
146 146
                 return $PaymentMethod;
147 147
         });
148 148
 
149
-        $app['eccube.helper.order'] = function ($app) {
149
+        $app['eccube.helper.order'] = function($app) {
150 150
             return new OrderHelper($app);
151 151
         };
152 152
 
153
-        $app['eccube.service.csv.export'] = function () use ($app) {
153
+        $app['eccube.service.csv.export'] = function() use ($app) {
154 154
             $csvService = new \Eccube\Service\CsvExportService();
155 155
             $csvService->setEntityManager($app['orm.em']);
156 156
             $csvService->setConfig($app['config']);
@@ -162,206 +162,206 @@  discard block
 block discarded – undo
162 162
 
163 163
             return $csvService;
164 164
         };
165
-        $app['eccube.service.shopping'] = function () use ($app) {
165
+        $app['eccube.service.shopping'] = function() use ($app) {
166 166
             return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']);
167 167
         };
168 168
 
169 169
         // Repository
170
-        $app['eccube.repository.master.authority'] = function () use ($app) {
170
+        $app['eccube.repository.master.authority'] = function() use ($app) {
171 171
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority');
172 172
         };
173
-        $app['eccube.repository.master.tag'] = function () use ($app) {
173
+        $app['eccube.repository.master.tag'] = function() use ($app) {
174 174
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag');
175 175
         };
176
-        $app['eccube.repository.master.pref'] = function () use ($app) {
176
+        $app['eccube.repository.master.pref'] = function() use ($app) {
177 177
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref');
178 178
         };
179
-        $app['eccube.repository.master.sex'] = function () use ($app) {
179
+        $app['eccube.repository.master.sex'] = function() use ($app) {
180 180
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex');
181 181
         };
182
-        $app['eccube.repository.master.disp'] = function () use ($app) {
182
+        $app['eccube.repository.master.disp'] = function() use ($app) {
183 183
             return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp');
184 184
         };
185
-        $app['eccube.repository.master.product_type'] = function () use ($app) {
185
+        $app['eccube.repository.master.product_type'] = function() use ($app) {
186 186
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType');
187 187
         };
188
-        $app['eccube.repository.master.page_max'] = function () use ($app) {
188
+        $app['eccube.repository.master.page_max'] = function() use ($app) {
189 189
             return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax');
190 190
         };
191
-        $app['eccube.repository.master.order_status'] = function () use ($app) {
191
+        $app['eccube.repository.master.order_status'] = function() use ($app) {
192 192
         };
193
-        $app['eccube.repository.master.product_list_max'] = function () use ($app) {
193
+        $app['eccube.repository.master.product_list_max'] = function() use ($app) {
194 194
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListMax');
195 195
         };
196
-        $app['eccube.repository.master.product_list_order_by'] = function () use ($app) {
196
+        $app['eccube.repository.master.product_list_order_by'] = function() use ($app) {
197 197
             return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListOrderBy');
198 198
         };
199
-        $app['eccube.repository.master.order_status'] = function () use ($app) {
199
+        $app['eccube.repository.master.order_status'] = function() use ($app) {
200 200
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus');
201 201
         };
202
-        $app['eccube.repository.master.device_type'] = function () use ($app) {
202
+        $app['eccube.repository.master.device_type'] = function() use ($app) {
203 203
             return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType');
204 204
         };
205
-        $app['eccube.repository.master.csv_type'] = function () use ($app) {
205
+        $app['eccube.repository.master.csv_type'] = function() use ($app) {
206 206
             return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType');
207 207
         };
208
-        $app['eccube.repository.master.order_item_type'] = function () use ($app) {
208
+        $app['eccube.repository.master.order_item_type'] = function() use ($app) {
209 209
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderItemType');
210 210
         };
211 211
 
212
-        $app['eccube.repository.delivery'] = function () use ($app) {
212
+        $app['eccube.repository.delivery'] = function() use ($app) {
213 213
             return $app['orm.em']->getRepository('Eccube\Entity\Delivery');
214 214
         };
215
-        $app['eccube.repository.delivery_date'] = function () use ($app) {
215
+        $app['eccube.repository.delivery_date'] = function() use ($app) {
216 216
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate');
217 217
         };
218
-        $app['eccube.repository.delivery_fee'] = function () use ($app) {
218
+        $app['eccube.repository.delivery_fee'] = function() use ($app) {
219 219
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee');
220 220
         };
221
-        $app['eccube.repository.delivery_time'] = function () use ($app) {
221
+        $app['eccube.repository.delivery_time'] = function() use ($app) {
222 222
             return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime');
223 223
         };
224
-        $app['eccube.repository.payment'] = function () use ($app) {
224
+        $app['eccube.repository.payment'] = function() use ($app) {
225 225
             return $app['orm.em']->getRepository('Eccube\Entity\Payment');
226 226
         };
227
-        $app['eccube.repository.payment_option'] = function () use ($app) {
227
+        $app['eccube.repository.payment_option'] = function() use ($app) {
228 228
             return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption');
229 229
         };
230
-        $app['eccube.repository.category'] = function () use ($app) {
230
+        $app['eccube.repository.category'] = function() use ($app) {
231 231
             $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category');
232 232
             $CategoryRepository->setApplication($app);
233 233
 
234 234
             return $CategoryRepository;
235 235
         };
236
-        $app['eccube.repository.customer'] = function () use ($app) {
236
+        $app['eccube.repository.customer'] = function() use ($app) {
237 237
             $customerRepository = $app['orm.em']->getRepository('Eccube\Entity\Customer');
238 238
             $customerRepository->setApplication($app);
239 239
             return $customerRepository;
240 240
         };
241
-        $app['eccube.repository.news'] = function () use ($app) {
241
+        $app['eccube.repository.news'] = function() use ($app) {
242 242
             return $app['orm.em']->getRepository('Eccube\Entity\News');
243 243
         };
244
-        $app['eccube.repository.mail_history'] = function () use ($app) {
244
+        $app['eccube.repository.mail_history'] = function() use ($app) {
245 245
             return $app['orm.em']->getRepository('Eccube\Entity\MailHistory');
246 246
         };
247
-        $app['eccube.repository.member'] = function () use ($app) {
247
+        $app['eccube.repository.member'] = function() use ($app) {
248 248
             $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member');
249 249
             $memberRepository->setEncoderFactorty($app['security.encoder_factory']);
250 250
             return $memberRepository;
251 251
         };
252
-        $app['eccube.repository.order'] = function () use ($app) {
252
+        $app['eccube.repository.order'] = function() use ($app) {
253 253
             return $app['orm.em']->getRepository('Eccube\Entity\Order');
254 254
         };
255
-        $app['eccube.repository.product'] = function () use ($app) {
255
+        $app['eccube.repository.product'] = function() use ($app) {
256 256
             $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product');
257 257
             $productRepository->setApplication($app);
258 258
 
259 259
             return $productRepository;
260 260
         };
261
-        $app['eccube.repository.product_image'] = function () use ($app) {
261
+        $app['eccube.repository.product_image'] = function() use ($app) {
262 262
             return $app['orm.em']->getRepository('Eccube\Entity\ProductImage');
263 263
         };
264
-        $app['eccube.repository.product_class'] = function () use ($app) {
264
+        $app['eccube.repository.product_class'] = function() use ($app) {
265 265
             return $app['orm.em']->getRepository('Eccube\Entity\ProductClass');
266 266
         };
267
-        $app['eccube.repository.product_stock'] = function () use ($app) {
267
+        $app['eccube.repository.product_stock'] = function() use ($app) {
268 268
             return $app['orm.em']->getRepository('Eccube\Entity\ProductStock');
269 269
         };
270
-        $app['eccube.repository.product_tag'] = function () use ($app) {
270
+        $app['eccube.repository.product_tag'] = function() use ($app) {
271 271
             return $app['orm.em']->getRepository('Eccube\Entity\ProductTag');
272 272
         };
273
-        $app['eccube.repository.class_name'] = function () use ($app) {
273
+        $app['eccube.repository.class_name'] = function() use ($app) {
274 274
             return $app['orm.em']->getRepository('Eccube\Entity\ClassName');
275 275
         };
276
-        $app['eccube.repository.class_category'] = function () use ($app) {
276
+        $app['eccube.repository.class_category'] = function() use ($app) {
277 277
             return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory');
278 278
         };
279
-        $app['eccube.repository.customer_favorite_product'] = function () use ($app) {
279
+        $app['eccube.repository.customer_favorite_product'] = function() use ($app) {
280 280
             return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct');
281 281
         };
282
-        $app['eccube.repository.base_info'] = function () use ($app) {
282
+        $app['eccube.repository.base_info'] = function() use ($app) {
283 283
             $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo');
284 284
             $BaseInfoRepository->setApplication($app);
285 285
 
286 286
             return $BaseInfoRepository;
287 287
         };
288
-        $app['eccube.repository.tax_rule'] = function () use ($app) {
288
+        $app['eccube.repository.tax_rule'] = function() use ($app) {
289 289
             $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule');
290 290
             $taxRuleRepository->setApplication($app);
291 291
 
292 292
             return $taxRuleRepository;
293 293
         };
294
-        $app['eccube.repository.page_layout'] = function () use ($app) {
294
+        $app['eccube.repository.page_layout'] = function() use ($app) {
295 295
             $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout');
296 296
             $pageLayoutRepository->setApplication($app);
297 297
 
298 298
             return $pageLayoutRepository;
299 299
         };
300
-        $app['eccube.repository.block'] = function () use ($app) {
300
+        $app['eccube.repository.block'] = function() use ($app) {
301 301
             $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block');
302 302
             $blockRepository->setApplication($app);
303 303
 
304 304
             return $blockRepository;
305 305
         };
306
-        $app['eccube.repository.order'] = function () use ($app) {
306
+        $app['eccube.repository.order'] = function() use ($app) {
307 307
             $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order');
308 308
             $orderRepository->setApplication($app);
309 309
 
310 310
             return $orderRepository;
311 311
         };
312
-        $app['eccube.repository.customer_address'] = function () use ($app) {
312
+        $app['eccube.repository.customer_address'] = function() use ($app) {
313 313
             return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress');
314 314
         };
315
-        $app['eccube.repository.shipping'] = function () use ($app) {
315
+        $app['eccube.repository.shipping'] = function() use ($app) {
316 316
             return $app['orm.em']->getRepository('Eccube\Entity\Shipping');
317 317
         };
318
-        $app['eccube.repository.shipment_item'] = function () use ($app) {
318
+        $app['eccube.repository.shipment_item'] = function() use ($app) {
319 319
             return $app['orm.em']->getRepository('Eccube\Entity\ShipmentItem');
320 320
         };
321
-        $app['eccube.repository.customer_status'] = function () use ($app) {
321
+        $app['eccube.repository.customer_status'] = function() use ($app) {
322 322
             return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus');
323 323
         };
324
-        $app['eccube.repository.order_status'] = function () use ($app) {
324
+        $app['eccube.repository.order_status'] = function() use ($app) {
325 325
             return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus');
326 326
         };
327
-        $app['eccube.repository.mail_template'] = function () use ($app) {
327
+        $app['eccube.repository.mail_template'] = function() use ($app) {
328 328
             return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate');
329 329
         };
330
-        $app['eccube.repository.csv'] = function () use ($app) {
330
+        $app['eccube.repository.csv'] = function() use ($app) {
331 331
             return $app['orm.em']->getRepository('Eccube\Entity\Csv');
332 332
         };
333
-        $app['eccube.repository.template'] = function () use ($app) {
333
+        $app['eccube.repository.template'] = function() use ($app) {
334 334
             return $app['orm.em']->getRepository('Eccube\Entity\Template');
335 335
         };
336
-        $app['eccube.repository.authority_role'] = function () use ($app) {
336
+        $app['eccube.repository.authority_role'] = function() use ($app) {
337 337
             return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole');
338 338
         };
339 339
 
340
-        $app['paginator'] = $app->protect(function () {
340
+        $app['paginator'] = $app->protect(function() {
341 341
             $paginator = new \Knp\Component\Pager\Paginator();
342 342
             $paginator->subscribe(new \Eccube\EventListener\PaginatorListener());
343 343
 
344 344
             return $paginator;
345 345
         });
346 346
 
347
-        $app['eccube.repository.help'] = function () use ($app) {
347
+        $app['eccube.repository.help'] = function() use ($app) {
348 348
             return $app['orm.em']->getRepository('Eccube\Entity\Help');
349 349
         };
350
-        $app['eccube.repository.plugin'] = function () use ($app) {
350
+        $app['eccube.repository.plugin'] = function() use ($app) {
351 351
             return $app['orm.em']->getRepository('Eccube\Entity\Plugin');
352 352
         };
353
-        $app['eccube.repository.plugin_event_handler'] = function () use ($app) {
353
+        $app['eccube.repository.plugin_event_handler'] = function() use ($app) {
354 354
             return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler');
355 355
         };
356
-        $app['eccube.repository.layout'] = function () use ($app) {
356
+        $app['eccube.repository.layout'] = function() use ($app) {
357 357
             return $app['orm.em']->getRepository('Eccube\Entity\Layout');
358 358
         };
359 359
 
360
-        $app['request_scope'] = function () {
360
+        $app['request_scope'] = function() {
361 361
             return new ParameterBag();
362 362
         };
363 363
         // TODO 使用するか検討
364
-        $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) {
364
+        $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) {
365 365
             $compiler
366 366
             ->addDebugInfo($node)
367 367
             ->write("echo 'Helloooooo ' . ")
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 
372 372
         });
373 373
         // TODO 使用するか検討
374
-        $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) {
374
+        $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) {
375 375
             $compiler
376 376
             ->addDebugInfo($node)
377 377
             ->write("echo 'jirooooooo ' . ")
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
         });
383 383
 
384 384
         // TODO 使用するか検討
385
-        $app['eccube.twig.generic_node_names'] = function () use ($app) {
385
+        $app['eccube.twig.generic_node_names'] = function() use ($app) {
386 386
             return [
387 387
                 'hello',
388 388
                 'jiro',
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
         };
392 392
 
393 393
         // TODO 使用するか検討
394
-        $app['twig_parsers'] = function () use ($app) {
394
+        $app['twig_parsers'] = function() use ($app) {
395 395
             $GenericTokenParsers = [];
396 396
             foreach ($app['eccube.twig.generic_node_names'] as $tagName) {
397 397
                 $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName);
@@ -400,20 +400,20 @@  discard block
 block discarded – undo
400 400
         };
401 401
 
402 402
         // TODO ServiceProvider から追加できるよう Collection にする
403
-        $app['eccube.twig.block.templates'] = function () {
403
+        $app['eccube.twig.block.templates'] = function() {
404 404
             return [
405 405
                 'render_block.twig',
406 406
             ];
407 407
         };
408 408
 
409 409
         // Form\Type
410
-        $app->extend('form.type.extensions', function ($extensions) use ($app) {
410
+        $app->extend('form.type.extensions', function($extensions) use ($app) {
411 411
             $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension();
412 412
             $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension();
413 413
             $extensions[] = new \Eccube\Form\Extension\DoctrineOrmExtension($app['orm.em']);
414 414
             return $extensions;
415 415
         });
416
-        $app->extend('form.types', function ($types) use ($app) {
416
+        $app->extend('form.types', function($types) use ($app) {
417 417
             $types[] = new \Eccube\Form\Type\NameType($app['config']);
418 418
             $types[] = new \Eccube\Form\Type\KanaType($app['config']);
419 419
             $types[] = new \Eccube\Form\Type\TelType($app['config']);
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
             return $types;
518 518
         });
519 519
         $app['eccube.entity.event.dispatcher']->addEventListener(new \Acme\Entity\SoldOutEventListener());
520
-        $app['eccube.queries'] = function () {
520
+        $app['eccube.queries'] = function() {
521 521
             return new \Eccube\Doctrine\Query\Queries();
522 522
         };
523 523
         // TODO QueryCustomizerの追加方法は要検討
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/ShipmentItemCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     public function hasProductByName($productName)
64 64
     {
65 65
         $ShipmentItems = $this->filter(
66
-            function (ItemInterface $ShipmentItem) use ($productName) {
66
+            function(ItemInterface $ShipmentItem) use ($productName) {
67 67
                 /* @var ShipmentItem $ShipmentItem */
68 68
                 return $ShipmentItem->getProductName() == $productName;
69 69
             });
Please login to merge, or discard this patch.
src/Eccube/Service/Calculator/CalculateContext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
         $this->buildCalculator($this->CalculateStrategies);
24 24
 
25 25
         /** @var ShipmentItem $ShipmentItem */
26
-        foreach($this->ShipmentItems as $ShipmentItem) {
26
+        foreach ($this->ShipmentItems as $ShipmentItem) {
27 27
             if ($ShipmentItem instanceof ShipmentItem) {
28 28
                 if (!$this->Order->getItems()->contains($ShipmentItem)) {
29 29
                     $ShipmentItem->setOrder($this->Order);
Please login to merge, or discard this patch.