@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | $this->register(new \Saxulum\Validator\Provider\SaxulumValidatorProvider()); |
170 | 170 | $this->register(new MobileDetectServiceProvider()); |
171 | 171 | |
172 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
172 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
173 | 173 | if ($this['debug']) { |
174 | 174 | return; |
175 | 175 | } |
@@ -263,14 +263,14 @@ discard block |
||
263 | 263 | return $router; |
264 | 264 | }); |
265 | 265 | |
266 | - $this['eccube.router.origin'] = function ($app) { |
|
266 | + $this['eccube.router.origin'] = function($app) { |
|
267 | 267 | $resource = __DIR__.'/Controller'; |
268 | 268 | $cachePrefix = 'Origin'; |
269 | 269 | |
270 | 270 | return $app['eccube.router']($resource, $cachePrefix); |
271 | 271 | }; |
272 | 272 | |
273 | - $this['eccube.routers.plugin'] = function ($app) { |
|
273 | + $this['eccube.routers.plugin'] = function($app) { |
|
274 | 274 | // TODO 有効なプラグインを対象とする必要がある. |
275 | 275 | $dirs = Finder::create() |
276 | 276 | ->in($app['config']['root_dir'].'/app/Plugin') |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | return $routers; |
288 | 288 | }; |
289 | 289 | |
290 | - $this['eccube.router.extend'] = function ($app) { |
|
290 | + $this['eccube.router.extend'] = function($app) { |
|
291 | 291 | // TODO ディレクトリ名は暫定 |
292 | 292 | $resource = $app['config']['root_dir'].'/app/Acme/Controller'; |
293 | 293 | $cachePrefix = 'Extend'; |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | return $router; |
298 | 298 | }; |
299 | 299 | |
300 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
300 | + $this->extend('request_matcher', function($matcher, $app) { |
|
301 | 301 | $matchers = []; |
302 | 302 | $matchers[] = $app['eccube.router.extend']; |
303 | 303 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | return new ChainUrlMatcher($matchers, $app['request_context']); |
310 | 310 | }); |
311 | 311 | |
312 | - $this->extend('url_generator', function ($generator, $app) { |
|
312 | + $this->extend('url_generator', function($generator, $app) { |
|
313 | 313 | $generators = []; |
314 | 314 | $generators[] = $app['eccube.router.extend']; |
315 | 315 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
341 | 341 | 'locale_fallbacks' => ['ja', 'en'], |
342 | 342 | )); |
343 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
343 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
344 | 344 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
345 | 345 | |
346 | 346 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -387,14 +387,14 @@ discard block |
||
387 | 387 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
388 | 388 | 'twig.form.templates' => array('Form/form_layout.twig'), |
389 | 389 | )); |
390 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
390 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
391 | 391 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
392 | 392 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
393 | 393 | |
394 | 394 | return $twig; |
395 | 395 | }); |
396 | 396 | |
397 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
397 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
398 | 398 | $app['admin'] = $app['front'] = false; |
399 | 399 | $pathinfo = rawurldecode($request->getPathInfo()); |
400 | 400 | if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) { |
@@ -410,14 +410,14 @@ discard block |
||
410 | 410 | } |
411 | 411 | $paths[] = $app['config']['template_admin_realdir']; |
412 | 412 | $paths[] = __DIR__.'/../../app/Plugin'; |
413 | - $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
413 | + $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
414 | 414 | } else { |
415 | 415 | if (file_exists($app['config']['template_realdir'])) { |
416 | 416 | $paths[] = $app['config']['template_realdir']; |
417 | 417 | } |
418 | 418 | $paths[] = $app['config']['template_default_realdir']; |
419 | 419 | $paths[] = __DIR__.'/../../app/Plugin'; |
420 | - $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
420 | + $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
421 | 421 | } |
422 | 422 | $app['twig']->setCache($app['debug'] ? null : $cacheDir); |
423 | 423 | $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths)); |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | }, self::EARLY_EVENT); |
436 | 436 | |
437 | 437 | // twigのグローバル変数を定義. |
438 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
438 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
439 | 439 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
440 | 440 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
441 | 441 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
503 | 503 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
504 | 504 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
505 | - \Swift::init(function () { |
|
505 | + \Swift::init(function() { |
|
506 | 506 | \Swift_DependencyContainer::getInstance() |
507 | 507 | ->register('mime.qpheaderencoder') |
508 | 508 | ->asAliasOf('mime.base64headerencoder'); |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | |
622 | 622 | $this->extend( |
623 | 623 | 'orm.em.config', |
624 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
624 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
625 | 625 | |
626 | 626 | /** @var $chain \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain */ |
627 | 627 | $chain = $config->getMetadataDriverImpl(); |
@@ -643,7 +643,7 @@ discard block |
||
643 | 643 | } |
644 | 644 | ); |
645 | 645 | |
646 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
646 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
647 | 647 | // tax_rule |
648 | 648 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
649 | 649 | $taxRuleRepository->setApplication($app); |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | // second level cacheの設定. |
677 | 677 | $this->extend( |
678 | 678 | 'orm.em.config', |
679 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
679 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
680 | 680 | $config->setSecondLevelCacheEnabled(); |
681 | 681 | $cacheConfig = $config->getSecondLevelCacheConfiguration(); |
682 | 682 | $regionConfig = $cacheConfig->getRegionsConfiguration(); |
@@ -765,31 +765,31 @@ discard block |
||
765 | 765 | array('^/mypage', 'ROLE_USER', $channel), |
766 | 766 | ); |
767 | 767 | |
768 | - $this['eccube.password_encoder'] = function ($app) { |
|
768 | + $this['eccube.password_encoder'] = function($app) { |
|
769 | 769 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
770 | 770 | }; |
771 | - $this['security.encoder_factory'] = function ($app) { |
|
771 | + $this['security.encoder_factory'] = function($app) { |
|
772 | 772 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
773 | 773 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
774 | 774 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
775 | 775 | )); |
776 | 776 | }; |
777 | - $this['eccube.event_listner.security'] = function ($app) { |
|
777 | + $this['eccube.event_listner.security'] = function($app) { |
|
778 | 778 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
779 | 779 | }; |
780 | 780 | |
781 | 781 | // Voterの設定 |
782 | - $this['authority_voter'] = function ($app) { |
|
782 | + $this['authority_voter'] = function($app) { |
|
783 | 783 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
784 | 784 | }; |
785 | 785 | |
786 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
786 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
787 | 787 | $voters[] = $app['authority_voter']; |
788 | 788 | |
789 | 789 | return $voters; |
790 | 790 | }); |
791 | 791 | |
792 | - $this['security.access_manager'] = function ($app) { |
|
792 | + $this['security.access_manager'] = function($app) { |
|
793 | 793 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
794 | 794 | }; |
795 | 795 | |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | { |
804 | 804 | $config = $this['config']; |
805 | 805 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
806 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) { |
|
806 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) { |
|
807 | 807 | // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する |
808 | 808 | Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies'])); |
809 | 809 | }, self::EARLY_EVENT); |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | $app = $this; |
970 | 970 | |
971 | 971 | // Response Event(http cache対応、event実行は一番遅く設定) |
972 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
972 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
973 | 973 | |
974 | 974 | if (!$event->isMasterRequest()) { |
975 | 975 | return; |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $builder->addEventListener( |
40 | 40 | FormEvents::PRE_SET_DATA, |
41 | - function (FormEvent $event) { |
|
41 | + function(FormEvent $event) { |
|
42 | 42 | $form = $event->getForm(); |
43 | 43 | $config = $form->getConfig(); |
44 | 44 | // data_classオプションが必要 |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | $CartItem |
222 | 222 | ->setClassName('Eccube\Entity\ProductClass') |
223 | 223 | ->setObject($ProductClass) |
224 | - ->setClassId((string)$ProductClass->getId()) |
|
224 | + ->setClassId((string) $ProductClass->getId()) |
|
225 | 225 | ->setPrice($ProductClass->getPrice02IncTax()) |
226 | 226 | ->setQuantity(1); |
227 | 227 | return $CartItem; |
@@ -252,8 +252,7 @@ discard block |
||
252 | 252 | $compareService = $this->generateCartCompareService(); |
253 | 253 | $ExistsCartItem = $compareService->getExistsCartItem($CartItem); |
254 | 254 | return $ExistsCartItem ? |
255 | - $ExistsCartItem->getQuantity() : |
|
256 | - 0; |
|
255 | + $ExistsCartItem->getQuantity() : 0; |
|
257 | 256 | } |
258 | 257 | |
259 | 258 | /** |
@@ -383,7 +382,7 @@ discard block |
||
383 | 382 | */ |
384 | 383 | public function getProductQuantity($productClassId) |
385 | 384 | { |
386 | - $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId); |
|
385 | + $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId); |
|
387 | 386 | if ($CartItem) { |
388 | 387 | return $CartItem->getQuantity(); |
389 | 388 | } else { |
@@ -468,7 +467,7 @@ discard block |
||
468 | 467 | $CartItem = new CartItem(); |
469 | 468 | $CartItem |
470 | 469 | ->setClassName('Eccube\Entity\ProductClass') |
471 | - ->setClassId((string)$ProductClass->getId()) |
|
470 | + ->setClassId((string) $ProductClass->getId()) |
|
472 | 471 | ->setPrice($ProductClass->getPrice02IncTax()) |
473 | 472 | ->setQuantity($quantity); |
474 | 473 | |
@@ -626,7 +625,7 @@ discard block |
||
626 | 625 | */ |
627 | 626 | public function removeProduct($productClassId) |
628 | 627 | { |
629 | - $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId); |
|
628 | + $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId); |
|
630 | 629 | |
631 | 630 | // 支払方法の再設定 |
632 | 631 | if ($this->BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
@@ -45,44 +45,44 @@ discard block |
||
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.cart.compare'] = $app->protect(function ($Cart) use ($app) { |
|
57 | + $app['eccube.service.cart.compare'] = $app->protect(function($Cart) use ($app) { |
|
58 | 58 | $service = new \Eccube\Service\CartCompareService($Cart); |
59 | 59 | $service->setContext($app['eccube.cart.comparator.context']); |
60 | 60 | return $service; |
61 | 61 | }); |
62 | - $app['eccube.cart.comparator.context'] = function () use ($app) { |
|
62 | + $app['eccube.cart.comparator.context'] = function() use ($app) { |
|
63 | 63 | $context = new \Eccube\Service\CartComparator\CompareContext(); |
64 | 64 | $context->addStrategy($app['eccube.cart.comparator.strategy.product_class']); |
65 | 65 | return $context; |
66 | 66 | }; |
67 | - $app['eccube.cart.comparator.strategy.product_class'] = function () { |
|
67 | + $app['eccube.cart.comparator.strategy.product_class'] = function() { |
|
68 | 68 | return new \Eccube\Service\CartComparator\Strategy\ProductClassStrategy(); |
69 | 69 | }; |
70 | - $app['eccube.service.order'] = function () use ($app) { |
|
70 | + $app['eccube.service.order'] = function() use ($app) { |
|
71 | 71 | return new \Eccube\Service\OrderService($app); |
72 | 72 | }; |
73 | - $app['eccube.service.tax_rule'] = function () use ($app) { |
|
73 | + $app['eccube.service.tax_rule'] = function() use ($app) { |
|
74 | 74 | return new \Eccube\Service\TaxRuleService($app['eccube.repository.tax_rule']); |
75 | 75 | }; |
76 | - $app['eccube.service.plugin'] = function () use ($app) { |
|
76 | + $app['eccube.service.plugin'] = function() use ($app) { |
|
77 | 77 | return new \Eccube\Service\PluginService($app); |
78 | 78 | }; |
79 | - $app['eccube.service.mail'] = function () use ($app) { |
|
79 | + $app['eccube.service.mail'] = function() use ($app) { |
|
80 | 80 | return new \Eccube\Service\MailService($app); |
81 | 81 | }; |
82 | - $app['eccube.calculate.context'] = function () use ($app) { |
|
82 | + $app['eccube.calculate.context'] = function() use ($app) { |
|
83 | 83 | return new \Eccube\Service\Calculator\CalculateContext(); |
84 | 84 | }; |
85 | - $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) { |
|
85 | + $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) { |
|
86 | 86 | $Service = new \Eccube\Service\CalculateService($Order, $Customer); |
87 | 87 | $Context = $app['eccube.calculate.context']; |
88 | 88 | $Context->setCalculateStrategies($app['eccube.calculate.strategies']($Order)); |
@@ -91,40 +91,40 @@ discard block |
||
91 | 91 | return $Service; |
92 | 92 | }); |
93 | 93 | |
94 | - $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) { |
|
94 | + $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) { |
|
95 | 95 | $Service = new $clazz; |
96 | 96 | $Service->setApplication($app); |
97 | 97 | return $Service; |
98 | 98 | }); |
99 | 99 | |
100 | - $app['eccube.calculate.strategies'] = $app->protect(function ($Order) use ($app) { |
|
100 | + $app['eccube.calculate.strategies'] = $app->protect(function($Order) use ($app) { |
|
101 | 101 | $Strategies = new \Doctrine\Common\Collections\ArrayCollection(); // TODO 暫定的に ArrayCollection とする. 専用クラスにしたい |
102 | 102 | // デフォルトのストラテジーをセットしておく |
103 | 103 | $Strategies->add($app['eccube.calculate.strategy.shipping']($Order)); |
104 | 104 | $Strategies->add($app['eccube.calculate.strategy.tax']($Order)); |
105 | 105 | return $Strategies; |
106 | 106 | }); |
107 | - $app['eccube.calculate.strategy.shipping'] = $app->protect(function ($Order) use ($app) { |
|
107 | + $app['eccube.calculate.strategy.shipping'] = $app->protect(function($Order) use ($app) { |
|
108 | 108 | $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy(); |
109 | 109 | $Strategy->setApplication($app); |
110 | 110 | $Strategy->setOrder($Order); |
111 | 111 | return $Strategy; |
112 | 112 | }); |
113 | - $app['eccube.calculate.strategy.tax'] = $app->protect(function ($Order) use ($app) { |
|
113 | + $app['eccube.calculate.strategy.tax'] = $app->protect(function($Order) use ($app) { |
|
114 | 114 | $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy(); |
115 | 115 | $Strategy->setApplication($app); |
116 | 116 | $Strategy->setOrder($Order); |
117 | 117 | return $Strategy; |
118 | 118 | }); |
119 | 119 | |
120 | - $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) { |
|
120 | + $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) { |
|
121 | 121 | $PaymentMethod = new $clazz; |
122 | 122 | $PaymentMethod->setApplication($app); |
123 | 123 | $PaymentMethod->setFormType($form); |
124 | 124 | return $PaymentMethod; |
125 | 125 | }); |
126 | 126 | |
127 | - $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) { |
|
127 | + $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) { |
|
128 | 128 | $PaymentMethod = new $clazz; |
129 | 129 | $PaymentMethod->setApplication($app); |
130 | 130 | $PaymentMethod->setFormType($form); |
@@ -132,11 +132,11 @@ discard block |
||
132 | 132 | return $PaymentMethod; |
133 | 133 | }); |
134 | 134 | |
135 | - $app['eccube.helper.order'] = function ($app) { |
|
135 | + $app['eccube.helper.order'] = function($app) { |
|
136 | 136 | return new OrderHelper($app); |
137 | 137 | }; |
138 | 138 | |
139 | - $app['eccube.service.csv.export'] = function () use ($app) { |
|
139 | + $app['eccube.service.csv.export'] = function() use ($app) { |
|
140 | 140 | $csvService = new \Eccube\Service\CsvExportService(); |
141 | 141 | $csvService->setEntityManager($app['orm.em']); |
142 | 142 | $csvService->setConfig($app['config']); |
@@ -148,195 +148,195 @@ discard block |
||
148 | 148 | |
149 | 149 | return $csvService; |
150 | 150 | }; |
151 | - $app['eccube.service.shopping'] = function () use ($app) { |
|
151 | + $app['eccube.service.shopping'] = function() use ($app) { |
|
152 | 152 | return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']); |
153 | 153 | }; |
154 | 154 | |
155 | 155 | // Repository |
156 | - $app['eccube.repository.master.authority'] = function () use ($app) { |
|
156 | + $app['eccube.repository.master.authority'] = function() use ($app) { |
|
157 | 157 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority'); |
158 | 158 | }; |
159 | - $app['eccube.repository.master.tag'] = function () use ($app) { |
|
159 | + $app['eccube.repository.master.tag'] = function() use ($app) { |
|
160 | 160 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag'); |
161 | 161 | }; |
162 | - $app['eccube.repository.master.pref'] = function () use ($app) { |
|
162 | + $app['eccube.repository.master.pref'] = function() use ($app) { |
|
163 | 163 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref'); |
164 | 164 | }; |
165 | - $app['eccube.repository.master.sex'] = function () use ($app) { |
|
165 | + $app['eccube.repository.master.sex'] = function() use ($app) { |
|
166 | 166 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex'); |
167 | 167 | }; |
168 | - $app['eccube.repository.master.disp'] = function () use ($app) { |
|
168 | + $app['eccube.repository.master.disp'] = function() use ($app) { |
|
169 | 169 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp'); |
170 | 170 | }; |
171 | - $app['eccube.repository.master.product_type'] = function () use ($app) { |
|
171 | + $app['eccube.repository.master.product_type'] = function() use ($app) { |
|
172 | 172 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType'); |
173 | 173 | }; |
174 | - $app['eccube.repository.master.page_max'] = function () use ($app) { |
|
174 | + $app['eccube.repository.master.page_max'] = function() use ($app) { |
|
175 | 175 | return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax'); |
176 | 176 | }; |
177 | - $app['eccube.repository.master.order_status'] = function () use ($app) { |
|
177 | + $app['eccube.repository.master.order_status'] = function() use ($app) { |
|
178 | 178 | }; |
179 | - $app['eccube.repository.master.product_list_max'] = function () use ($app) { |
|
179 | + $app['eccube.repository.master.product_list_max'] = function() use ($app) { |
|
180 | 180 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListMax'); |
181 | 181 | }; |
182 | - $app['eccube.repository.master.product_list_order_by'] = function () use ($app) { |
|
182 | + $app['eccube.repository.master.product_list_order_by'] = function() use ($app) { |
|
183 | 183 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListOrderBy'); |
184 | 184 | }; |
185 | - $app['eccube.repository.master.order_status'] = function () use ($app) { |
|
185 | + $app['eccube.repository.master.order_status'] = function() use ($app) { |
|
186 | 186 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
187 | 187 | }; |
188 | - $app['eccube.repository.master.device_type'] = function () use ($app) { |
|
188 | + $app['eccube.repository.master.device_type'] = function() use ($app) { |
|
189 | 189 | return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType'); |
190 | 190 | }; |
191 | - $app['eccube.repository.master.csv_type'] = function () use ($app) { |
|
191 | + $app['eccube.repository.master.csv_type'] = function() use ($app) { |
|
192 | 192 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType'); |
193 | 193 | }; |
194 | 194 | |
195 | - $app['eccube.repository.delivery'] = function () use ($app) { |
|
195 | + $app['eccube.repository.delivery'] = function() use ($app) { |
|
196 | 196 | return $app['orm.em']->getRepository('Eccube\Entity\Delivery'); |
197 | 197 | }; |
198 | - $app['eccube.repository.delivery_date'] = function () use ($app) { |
|
198 | + $app['eccube.repository.delivery_date'] = function() use ($app) { |
|
199 | 199 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate'); |
200 | 200 | }; |
201 | - $app['eccube.repository.delivery_fee'] = function () use ($app) { |
|
201 | + $app['eccube.repository.delivery_fee'] = function() use ($app) { |
|
202 | 202 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee'); |
203 | 203 | }; |
204 | - $app['eccube.repository.delivery_time'] = function () use ($app) { |
|
204 | + $app['eccube.repository.delivery_time'] = function() use ($app) { |
|
205 | 205 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime'); |
206 | 206 | }; |
207 | - $app['eccube.repository.payment'] = function () use ($app) { |
|
207 | + $app['eccube.repository.payment'] = function() use ($app) { |
|
208 | 208 | return $app['orm.em']->getRepository('Eccube\Entity\Payment'); |
209 | 209 | }; |
210 | - $app['eccube.repository.payment_option'] = function () use ($app) { |
|
210 | + $app['eccube.repository.payment_option'] = function() use ($app) { |
|
211 | 211 | return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption'); |
212 | 212 | }; |
213 | - $app['eccube.repository.category'] = function () use ($app) { |
|
213 | + $app['eccube.repository.category'] = function() use ($app) { |
|
214 | 214 | $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category'); |
215 | 215 | $CategoryRepository->setApplication($app); |
216 | 216 | |
217 | 217 | return $CategoryRepository; |
218 | 218 | }; |
219 | - $app['eccube.repository.customer'] = function () use ($app) { |
|
219 | + $app['eccube.repository.customer'] = function() use ($app) { |
|
220 | 220 | return $app['orm.em']->getRepository('Eccube\Entity\Customer'); |
221 | 221 | }; |
222 | - $app['eccube.repository.news'] = function () use ($app) { |
|
222 | + $app['eccube.repository.news'] = function() use ($app) { |
|
223 | 223 | return $app['orm.em']->getRepository('Eccube\Entity\News'); |
224 | 224 | }; |
225 | - $app['eccube.repository.mail_history'] = function () use ($app) { |
|
225 | + $app['eccube.repository.mail_history'] = function() use ($app) { |
|
226 | 226 | return $app['orm.em']->getRepository('Eccube\Entity\MailHistory'); |
227 | 227 | }; |
228 | - $app['eccube.repository.member'] = function () use ($app) { |
|
228 | + $app['eccube.repository.member'] = function() use ($app) { |
|
229 | 229 | $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member'); |
230 | 230 | $memberRepository->setEncoderFactorty($app['security.encoder_factory']); |
231 | 231 | return $memberRepository; |
232 | 232 | }; |
233 | - $app['eccube.repository.order'] = function () use ($app) { |
|
233 | + $app['eccube.repository.order'] = function() use ($app) { |
|
234 | 234 | return $app['orm.em']->getRepository('Eccube\Entity\Order'); |
235 | 235 | }; |
236 | - $app['eccube.repository.product'] = function () use ($app) { |
|
236 | + $app['eccube.repository.product'] = function() use ($app) { |
|
237 | 237 | $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product'); |
238 | 238 | $productRepository->setApplication($app); |
239 | 239 | |
240 | 240 | return $productRepository; |
241 | 241 | }; |
242 | - $app['eccube.repository.product_image'] = function () use ($app) { |
|
242 | + $app['eccube.repository.product_image'] = function() use ($app) { |
|
243 | 243 | return $app['orm.em']->getRepository('Eccube\Entity\ProductImage'); |
244 | 244 | }; |
245 | - $app['eccube.repository.product_class'] = function () use ($app) { |
|
245 | + $app['eccube.repository.product_class'] = function() use ($app) { |
|
246 | 246 | return $app['orm.em']->getRepository('Eccube\Entity\ProductClass'); |
247 | 247 | }; |
248 | - $app['eccube.repository.product_stock'] = function () use ($app) { |
|
248 | + $app['eccube.repository.product_stock'] = function() use ($app) { |
|
249 | 249 | return $app['orm.em']->getRepository('Eccube\Entity\ProductStock'); |
250 | 250 | }; |
251 | - $app['eccube.repository.product_tag'] = function () use ($app) { |
|
251 | + $app['eccube.repository.product_tag'] = function() use ($app) { |
|
252 | 252 | return $app['orm.em']->getRepository('Eccube\Entity\ProductTag'); |
253 | 253 | }; |
254 | - $app['eccube.repository.class_name'] = function () use ($app) { |
|
254 | + $app['eccube.repository.class_name'] = function() use ($app) { |
|
255 | 255 | return $app['orm.em']->getRepository('Eccube\Entity\ClassName'); |
256 | 256 | }; |
257 | - $app['eccube.repository.class_category'] = function () use ($app) { |
|
257 | + $app['eccube.repository.class_category'] = function() use ($app) { |
|
258 | 258 | return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory'); |
259 | 259 | }; |
260 | - $app['eccube.repository.customer_favorite_product'] = function () use ($app) { |
|
260 | + $app['eccube.repository.customer_favorite_product'] = function() use ($app) { |
|
261 | 261 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct'); |
262 | 262 | }; |
263 | - $app['eccube.repository.base_info'] = function () use ($app) { |
|
263 | + $app['eccube.repository.base_info'] = function() use ($app) { |
|
264 | 264 | $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo'); |
265 | 265 | $BaseInfoRepository->setApplication($app); |
266 | 266 | |
267 | 267 | return $BaseInfoRepository; |
268 | 268 | }; |
269 | - $app['eccube.repository.tax_rule'] = function () use ($app) { |
|
269 | + $app['eccube.repository.tax_rule'] = function() use ($app) { |
|
270 | 270 | $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule'); |
271 | 271 | $taxRuleRepository->setApplication($app); |
272 | 272 | |
273 | 273 | return $taxRuleRepository; |
274 | 274 | }; |
275 | - $app['eccube.repository.page_layout'] = function () use ($app) { |
|
275 | + $app['eccube.repository.page_layout'] = function() use ($app) { |
|
276 | 276 | $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout'); |
277 | 277 | $pageLayoutRepository->setApplication($app); |
278 | 278 | |
279 | 279 | return $pageLayoutRepository; |
280 | 280 | }; |
281 | - $app['eccube.repository.block'] = function () use ($app) { |
|
281 | + $app['eccube.repository.block'] = function() use ($app) { |
|
282 | 282 | $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block'); |
283 | 283 | $blockRepository->setApplication($app); |
284 | 284 | |
285 | 285 | return $blockRepository; |
286 | 286 | }; |
287 | - $app['eccube.repository.order'] = function () use ($app) { |
|
287 | + $app['eccube.repository.order'] = function() use ($app) { |
|
288 | 288 | $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order'); |
289 | 289 | $orderRepository->setApplication($app); |
290 | 290 | |
291 | 291 | return $orderRepository; |
292 | 292 | }; |
293 | - $app['eccube.repository.customer_address'] = function () use ($app) { |
|
293 | + $app['eccube.repository.customer_address'] = function() use ($app) { |
|
294 | 294 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress'); |
295 | 295 | }; |
296 | - $app['eccube.repository.shipping'] = function () use ($app) { |
|
296 | + $app['eccube.repository.shipping'] = function() use ($app) { |
|
297 | 297 | return $app['orm.em']->getRepository('Eccube\Entity\Shipping'); |
298 | 298 | }; |
299 | - $app['eccube.repository.customer_status'] = function () use ($app) { |
|
299 | + $app['eccube.repository.customer_status'] = function() use ($app) { |
|
300 | 300 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus'); |
301 | 301 | }; |
302 | - $app['eccube.repository.order_status'] = function () use ($app) { |
|
302 | + $app['eccube.repository.order_status'] = function() use ($app) { |
|
303 | 303 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
304 | 304 | }; |
305 | - $app['eccube.repository.mail_template'] = function () use ($app) { |
|
305 | + $app['eccube.repository.mail_template'] = function() use ($app) { |
|
306 | 306 | return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate'); |
307 | 307 | }; |
308 | - $app['eccube.repository.csv'] = function () use ($app) { |
|
308 | + $app['eccube.repository.csv'] = function() use ($app) { |
|
309 | 309 | return $app['orm.em']->getRepository('Eccube\Entity\Csv'); |
310 | 310 | }; |
311 | - $app['eccube.repository.template'] = function () use ($app) { |
|
311 | + $app['eccube.repository.template'] = function() use ($app) { |
|
312 | 312 | return $app['orm.em']->getRepository('Eccube\Entity\Template'); |
313 | 313 | }; |
314 | - $app['eccube.repository.authority_role'] = function () use ($app) { |
|
314 | + $app['eccube.repository.authority_role'] = function() use ($app) { |
|
315 | 315 | return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole'); |
316 | 316 | }; |
317 | 317 | |
318 | - $app['paginator'] = $app->protect(function () { |
|
318 | + $app['paginator'] = $app->protect(function() { |
|
319 | 319 | $paginator = new \Knp\Component\Pager\Paginator(); |
320 | 320 | $paginator->subscribe(new \Eccube\EventListener\PaginatorListener()); |
321 | 321 | |
322 | 322 | return $paginator; |
323 | 323 | }); |
324 | 324 | |
325 | - $app['eccube.repository.help'] = function () use ($app) { |
|
325 | + $app['eccube.repository.help'] = function() use ($app) { |
|
326 | 326 | return $app['orm.em']->getRepository('Eccube\Entity\Help'); |
327 | 327 | }; |
328 | - $app['eccube.repository.plugin'] = function () use ($app) { |
|
328 | + $app['eccube.repository.plugin'] = function() use ($app) { |
|
329 | 329 | return $app['orm.em']->getRepository('Eccube\Entity\Plugin'); |
330 | 330 | }; |
331 | - $app['eccube.repository.plugin_event_handler'] = function () use ($app) { |
|
331 | + $app['eccube.repository.plugin_event_handler'] = function() use ($app) { |
|
332 | 332 | return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler'); |
333 | 333 | }; |
334 | 334 | |
335 | - $app['request_scope'] = function () { |
|
335 | + $app['request_scope'] = function() { |
|
336 | 336 | return new ParameterBag(); |
337 | 337 | }; |
338 | 338 | // TODO 使用するか検討 |
339 | - $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) { |
|
339 | + $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) { |
|
340 | 340 | $compiler |
341 | 341 | ->addDebugInfo($node) |
342 | 342 | ->write("echo 'Helloooooo ' . ") |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | |
347 | 347 | }); |
348 | 348 | // TODO 使用するか検討 |
349 | - $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) { |
|
349 | + $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) { |
|
350 | 350 | $compiler |
351 | 351 | ->addDebugInfo($node) |
352 | 352 | ->write("echo 'jirooooooo ' . ") |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | }); |
358 | 358 | |
359 | 359 | // TODO 使用するか検討 |
360 | - $app['eccube.twig.generic_node_names'] = function () use ($app) { |
|
360 | + $app['eccube.twig.generic_node_names'] = function() use ($app) { |
|
361 | 361 | return [ |
362 | 362 | 'hello', |
363 | 363 | 'jiro', |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | }; |
367 | 367 | |
368 | 368 | // TODO 使用するか検討 |
369 | - $app['twig_parsers'] = function () use ($app) { |
|
369 | + $app['twig_parsers'] = function() use ($app) { |
|
370 | 370 | $GenericTokenParsers = []; |
371 | 371 | foreach ($app['eccube.twig.generic_node_names'] as $tagName) { |
372 | 372 | $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName); |
@@ -375,20 +375,20 @@ discard block |
||
375 | 375 | }; |
376 | 376 | |
377 | 377 | // TODO ServiceProvider から追加できるよう Collection にする |
378 | - $app['eccube.twig.block.templates'] = function () { |
|
378 | + $app['eccube.twig.block.templates'] = function() { |
|
379 | 379 | return [ |
380 | 380 | 'render_block.twig', |
381 | 381 | ]; |
382 | 382 | }; |
383 | 383 | |
384 | 384 | // Form\Type |
385 | - $app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
385 | + $app->extend('form.type.extensions', function($extensions) use ($app) { |
|
386 | 386 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
387 | 387 | $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension(); |
388 | 388 | $extensions[] = new \Eccube\Form\Extension\DoctrineOrmExtension($app['orm.em']); |
389 | 389 | return $extensions; |
390 | 390 | }); |
391 | - $app->extend('form.types', function ($types) use ($app) { |
|
391 | + $app->extend('form.types', function($types) use ($app) { |
|
392 | 392 | $types[] = new \Eccube\Form\Type\NameType($app['config']); |
393 | 393 | $types[] = new \Eccube\Form\Type\KanaType($app['config']); |
394 | 394 | $types[] = new \Eccube\Form\Type\TelType($app['config']); |