@@ -446,7 +446,7 @@ |
||
446 | 446 | $session->set('eccube.admin.order.product.search', $searchData); |
447 | 447 | $session->set('eccube.admin.order.product.search.page_no', $page_no); |
448 | 448 | } else { |
449 | - $searchData = (array)$session->get('eccube.admin.order.product.search'); |
|
449 | + $searchData = (array) $session->get('eccube.admin.order.product.search'); |
|
450 | 450 | if (is_null($page_no)) { |
451 | 451 | $page_no = intval($session->get('eccube.admin.order.product.search.page_no')); |
452 | 452 | } else { |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | $this->register(new \Saxulum\Validator\Provider\SaxulumValidatorProvider()); |
161 | 161 | $this->register(new MobileDetectServiceProvider()); |
162 | 162 | |
163 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
163 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
164 | 164 | if ($this['debug']) { |
165 | 165 | return; |
166 | 166 | } |
@@ -254,14 +254,14 @@ discard block |
||
254 | 254 | return $router; |
255 | 255 | }); |
256 | 256 | |
257 | - $this['eccube.router.origin'] = function ($app) { |
|
257 | + $this['eccube.router.origin'] = function($app) { |
|
258 | 258 | $resource = __DIR__.'/Controller'; |
259 | 259 | $cachePrefix = 'Origin'; |
260 | 260 | |
261 | 261 | return $app['eccube.router']($resource, $cachePrefix); |
262 | 262 | }; |
263 | 263 | |
264 | - $this['eccube.routers.plugin'] = function ($app) { |
|
264 | + $this['eccube.routers.plugin'] = function($app) { |
|
265 | 265 | // TODO 有効なプラグインを対象とする必要がある. |
266 | 266 | $dirs = Finder::create() |
267 | 267 | ->in($app['config']['root_dir'].'/app/Plugin') |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | return $routers; |
279 | 279 | }; |
280 | 280 | |
281 | - $this['eccube.router.extend'] = function ($app) { |
|
281 | + $this['eccube.router.extend'] = function($app) { |
|
282 | 282 | // TODO ディレクトリ名は暫定 |
283 | 283 | $resource = $app['config']['root_dir'].'/app/Acme/Controller'; |
284 | 284 | $cachePrefix = 'Extend'; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | return $router; |
289 | 289 | }; |
290 | 290 | |
291 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
291 | + $this->extend('request_matcher', function($matcher, $app) { |
|
292 | 292 | $matchers = []; |
293 | 293 | $matchers[] = $app['eccube.router.extend']; |
294 | 294 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | return new ChainUrlMatcher($matchers, $app['request_context']); |
301 | 301 | }); |
302 | 302 | |
303 | - $this->extend('url_generator', function ($generator, $app) { |
|
303 | + $this->extend('url_generator', function($generator, $app) { |
|
304 | 304 | $generators = []; |
305 | 305 | $generators[] = $app['eccube.router.extend']; |
306 | 306 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | }); |
314 | 314 | |
315 | 315 | // TODO この設定が正しいか要確認 |
316 | - $this->extend('routes_factory', function ($routes, $app ) { |
|
316 | + $this->extend('routes_factory', function($routes, $app) { |
|
317 | 317 | return $this['sensio_framework_extra.routing.loader.annot_dir']->load($this['config']['root_dir'].'/src/Eccube/Controller'); |
318 | 318 | }); |
319 | 319 | // init http cache |
@@ -335,7 +335,7 @@ discard block |
||
335 | 335 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
336 | 336 | 'locale_fallbacks' => ['ja', 'en'], |
337 | 337 | )); |
338 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
338 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
339 | 339 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
340 | 340 | |
341 | 341 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -382,14 +382,14 @@ discard block |
||
382 | 382 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
383 | 383 | 'twig.form.templates' => array('Form/form_layout.twig'), |
384 | 384 | )); |
385 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
385 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
386 | 386 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
387 | 387 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
388 | 388 | |
389 | 389 | return $twig; |
390 | 390 | }); |
391 | 391 | |
392 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
392 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
393 | 393 | $app['admin'] = $app['front'] = false; |
394 | 394 | $pathinfo = rawurldecode($request->getPathInfo()); |
395 | 395 | if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) { |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | } |
406 | 406 | $paths[] = $app['config']['template_admin_realdir']; |
407 | 407 | $paths[] = __DIR__.'/../../app/Plugin'; |
408 | - $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
408 | + $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
409 | 409 | } else { |
410 | 410 | // モバイル端末時、smartphoneディレクトリを探索パスに追加する. |
411 | 411 | if ($app['mobile_detect.device_type'] == \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP) { |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | } |
421 | 421 | $paths[] = $app['config']['template_default_realdir']; |
422 | 422 | $paths[] = __DIR__.'/../../app/Plugin'; |
423 | - $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
423 | + $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
424 | 424 | } |
425 | 425 | $app['twig']->setCache($app['debug'] ? null : $cacheDir); |
426 | 426 | $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths)); |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | }, self::EARLY_EVENT); |
439 | 439 | |
440 | 440 | // twigのグローバル変数を定義. |
441 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
441 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
442 | 442 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
443 | 443 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
444 | 444 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
525 | 525 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
526 | 526 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
527 | - \Swift::init(function () { |
|
527 | + \Swift::init(function() { |
|
528 | 528 | \Swift_DependencyContainer::getInstance() |
529 | 529 | ->register('mime.qpheaderencoder') |
530 | 530 | ->asAliasOf('mime.base64headerencoder'); |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | $this->register(new \Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider()); |
560 | 560 | |
561 | 561 | $app = $this; |
562 | - $this->extend('db.event_manager', function ($evm) use ($app) { |
|
562 | + $this->extend('db.event_manager', function($evm) use ($app) { |
|
563 | 563 | $initSubscriber = new InitSubscriber($app); |
564 | 564 | $evm->addEventSubscriber($initSubscriber); |
565 | 565 | |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | |
655 | 655 | $this->extend( |
656 | 656 | 'orm.em.config', |
657 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
657 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
658 | 658 | |
659 | 659 | /** @var $chain \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain */ |
660 | 660 | $chain = $config->getMetadataDriverImpl(); |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | } |
677 | 677 | ); |
678 | 678 | |
679 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
679 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
680 | 680 | // tax_rule |
681 | 681 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
682 | 682 | $taxRuleRepository->setApplication($app); |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | // second level cacheの設定. |
706 | 706 | $this->extend( |
707 | 707 | 'orm.em.config', |
708 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
708 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
709 | 709 | $config->setSecondLevelCacheEnabled(); |
710 | 710 | $cacheConfig = $config->getSecondLevelCacheConfiguration(); |
711 | 711 | $regionConfig = $cacheConfig->getRegionsConfiguration(); |
@@ -794,31 +794,31 @@ discard block |
||
794 | 794 | array('^/mypage', 'ROLE_USER', $channel), |
795 | 795 | ); |
796 | 796 | |
797 | - $this['eccube.password_encoder'] = function ($app) { |
|
797 | + $this['eccube.password_encoder'] = function($app) { |
|
798 | 798 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
799 | 799 | }; |
800 | - $this['security.encoder_factory'] = function ($app) { |
|
800 | + $this['security.encoder_factory'] = function($app) { |
|
801 | 801 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
802 | 802 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
803 | 803 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
804 | 804 | )); |
805 | 805 | }; |
806 | - $this['eccube.event_listner.security'] = function ($app) { |
|
806 | + $this['eccube.event_listner.security'] = function($app) { |
|
807 | 807 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
808 | 808 | }; |
809 | 809 | |
810 | 810 | // Voterの設定 |
811 | - $this['authority_voter'] = function ($app) { |
|
811 | + $this['authority_voter'] = function($app) { |
|
812 | 812 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
813 | 813 | }; |
814 | 814 | |
815 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
815 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
816 | 816 | $voters[] = $app['authority_voter']; |
817 | 817 | |
818 | 818 | return $voters; |
819 | 819 | }); |
820 | 820 | |
821 | - $this['security.access_manager'] = function ($app) { |
|
821 | + $this['security.access_manager'] = function($app) { |
|
822 | 822 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
823 | 823 | }; |
824 | 824 | |
@@ -832,7 +832,7 @@ discard block |
||
832 | 832 | { |
833 | 833 | $config = $this['config']; |
834 | 834 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
835 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) { |
|
835 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) { |
|
836 | 836 | // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する |
837 | 837 | Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies'])); |
838 | 838 | }, self::EARLY_EVENT); |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | $this->register(new ServiceProvider\EccubePluginServiceProvider()); |
850 | 850 | |
851 | 851 | // TODO Acme\ServiceProvider の初期化はここで OK? |
852 | - if (array_key_exists('service',$this['config'])) { |
|
852 | + if (array_key_exists('service', $this['config'])) { |
|
853 | 853 | foreach ($this['config']['service'] as $service) { |
854 | 854 | $this->register(new $service); |
855 | 855 | } |
@@ -1005,7 +1005,7 @@ discard block |
||
1005 | 1005 | $app = $this; |
1006 | 1006 | |
1007 | 1007 | // Response Event(http cache対応、event実行は一番遅く設定) |
1008 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
1008 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
1009 | 1009 | |
1010 | 1010 | if (!$event->isMasterRequest()) { |
1011 | 1011 | return; |
@@ -45,31 +45,31 @@ 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.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 | $Context->setCalculateStrategies($app['eccube.calculate.strategies']($Order)); |
@@ -78,40 +78,40 @@ discard block |
||
78 | 78 | return $Service; |
79 | 79 | }); |
80 | 80 | |
81 | - $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) { |
|
81 | + $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) { |
|
82 | 82 | $Service = new $clazz; |
83 | 83 | $Service->setApplication($app); |
84 | 84 | return $Service; |
85 | 85 | }); |
86 | 86 | |
87 | - $app['eccube.calculate.strategies'] = $app->protect(function ($Order) use ($app) { |
|
87 | + $app['eccube.calculate.strategies'] = $app->protect(function($Order) use ($app) { |
|
88 | 88 | $Strategies = new \Doctrine\Common\Collections\ArrayCollection(); // TODO 暫定的に ArrayCollection とする. 専用クラスにしたい |
89 | 89 | // デフォルトのストラテジーをセットしておく |
90 | 90 | $Strategies->add($app['eccube.calculate.strategy.shipping']($Order)); |
91 | 91 | $Strategies->add($app['eccube.calculate.strategy.tax']($Order)); |
92 | 92 | return $Strategies; |
93 | 93 | }); |
94 | - $app['eccube.calculate.strategy.shipping'] = $app->protect(function ($Order) use ($app) { |
|
94 | + $app['eccube.calculate.strategy.shipping'] = $app->protect(function($Order) use ($app) { |
|
95 | 95 | $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy(); |
96 | 96 | $Strategy->setApplication($app); |
97 | 97 | $Strategy->setOrder($Order); |
98 | 98 | return $Strategy; |
99 | 99 | }); |
100 | - $app['eccube.calculate.strategy.tax'] = $app->protect(function ($Order) use ($app) { |
|
100 | + $app['eccube.calculate.strategy.tax'] = $app->protect(function($Order) use ($app) { |
|
101 | 101 | $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy(); |
102 | 102 | $Strategy->setApplication($app); |
103 | 103 | $Strategy->setOrder($Order); |
104 | 104 | return $Strategy; |
105 | 105 | }); |
106 | 106 | |
107 | - $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) { |
|
107 | + $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) { |
|
108 | 108 | $PaymentMethod = new $clazz; |
109 | 109 | $PaymentMethod->setApplication($app); |
110 | 110 | $PaymentMethod->setFormType($form); |
111 | 111 | return $PaymentMethod; |
112 | 112 | }); |
113 | 113 | |
114 | - $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) { |
|
114 | + $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) { |
|
115 | 115 | $PaymentMethod = new $clazz; |
116 | 116 | $PaymentMethod->setApplication($app); |
117 | 117 | $PaymentMethod->setFormType($form); |
@@ -119,11 +119,11 @@ discard block |
||
119 | 119 | return $PaymentMethod; |
120 | 120 | }); |
121 | 121 | |
122 | - $app['eccube.helper.order'] = function ($app) { |
|
122 | + $app['eccube.helper.order'] = function($app) { |
|
123 | 123 | return new OrderHelper($app); |
124 | 124 | }; |
125 | 125 | |
126 | - $app['eccube.service.csv.export'] = function () use ($app) { |
|
126 | + $app['eccube.service.csv.export'] = function() use ($app) { |
|
127 | 127 | $csvService = new \Eccube\Service\CsvExportService(); |
128 | 128 | $csvService->setEntityManager($app['orm.em']); |
129 | 129 | $csvService->setConfig($app['config']); |
@@ -135,206 +135,206 @@ discard block |
||
135 | 135 | |
136 | 136 | return $csvService; |
137 | 137 | }; |
138 | - $app['eccube.service.shopping'] = function () use ($app) { |
|
138 | + $app['eccube.service.shopping'] = function() use ($app) { |
|
139 | 139 | return new \Eccube\Service\ShoppingService($app, $app['eccube.service.cart'], $app['eccube.service.order']); |
140 | 140 | }; |
141 | 141 | |
142 | 142 | // Repository |
143 | - $app['eccube.repository.master.authority'] = function () use ($app) { |
|
143 | + $app['eccube.repository.master.authority'] = function() use ($app) { |
|
144 | 144 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Authority'); |
145 | 145 | }; |
146 | - $app['eccube.repository.master.tag'] = function () use ($app) { |
|
146 | + $app['eccube.repository.master.tag'] = function() use ($app) { |
|
147 | 147 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Tag'); |
148 | 148 | }; |
149 | - $app['eccube.repository.master.pref'] = function () use ($app) { |
|
149 | + $app['eccube.repository.master.pref'] = function() use ($app) { |
|
150 | 150 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Pref'); |
151 | 151 | }; |
152 | - $app['eccube.repository.master.sex'] = function () use ($app) { |
|
152 | + $app['eccube.repository.master.sex'] = function() use ($app) { |
|
153 | 153 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Sex'); |
154 | 154 | }; |
155 | - $app['eccube.repository.master.disp'] = function () use ($app) { |
|
155 | + $app['eccube.repository.master.disp'] = function() use ($app) { |
|
156 | 156 | return $app['orm.em']->getRepository('Eccube\Entity\Master\Disp'); |
157 | 157 | }; |
158 | - $app['eccube.repository.master.product_type'] = function () use ($app) { |
|
158 | + $app['eccube.repository.master.product_type'] = function() use ($app) { |
|
159 | 159 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductType'); |
160 | 160 | }; |
161 | - $app['eccube.repository.master.page_max'] = function () use ($app) { |
|
161 | + $app['eccube.repository.master.page_max'] = function() use ($app) { |
|
162 | 162 | return $app['orm.em']->getRepository('Eccube\Entity\Master\PageMax'); |
163 | 163 | }; |
164 | - $app['eccube.repository.master.order_status'] = function () use ($app) { |
|
164 | + $app['eccube.repository.master.order_status'] = function() use ($app) { |
|
165 | 165 | }; |
166 | - $app['eccube.repository.master.product_list_max'] = function () use ($app) { |
|
166 | + $app['eccube.repository.master.product_list_max'] = function() use ($app) { |
|
167 | 167 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListMax'); |
168 | 168 | }; |
169 | - $app['eccube.repository.master.product_list_order_by'] = function () use ($app) { |
|
169 | + $app['eccube.repository.master.product_list_order_by'] = function() use ($app) { |
|
170 | 170 | return $app['orm.em']->getRepository('Eccube\Entity\Master\ProductListOrderBy'); |
171 | 171 | }; |
172 | - $app['eccube.repository.master.order_status'] = function () use ($app) { |
|
172 | + $app['eccube.repository.master.order_status'] = function() use ($app) { |
|
173 | 173 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
174 | 174 | }; |
175 | - $app['eccube.repository.master.device_type'] = function () use ($app) { |
|
175 | + $app['eccube.repository.master.device_type'] = function() use ($app) { |
|
176 | 176 | return $app['orm.em']->getRepository('Eccube\Entity\Master\DeviceType'); |
177 | 177 | }; |
178 | - $app['eccube.repository.master.csv_type'] = function () use ($app) { |
|
178 | + $app['eccube.repository.master.csv_type'] = function() use ($app) { |
|
179 | 179 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CsvType'); |
180 | 180 | }; |
181 | - $app['eccube.repository.master.order_item_type'] = function () use ($app) { |
|
181 | + $app['eccube.repository.master.order_item_type'] = function() use ($app) { |
|
182 | 182 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderItemType'); |
183 | 183 | }; |
184 | 184 | |
185 | - $app['eccube.repository.delivery'] = function () use ($app) { |
|
185 | + $app['eccube.repository.delivery'] = function() use ($app) { |
|
186 | 186 | return $app['orm.em']->getRepository('Eccube\Entity\Delivery'); |
187 | 187 | }; |
188 | - $app['eccube.repository.delivery_date'] = function () use ($app) { |
|
188 | + $app['eccube.repository.delivery_date'] = function() use ($app) { |
|
189 | 189 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate'); |
190 | 190 | }; |
191 | - $app['eccube.repository.delivery_fee'] = function () use ($app) { |
|
191 | + $app['eccube.repository.delivery_fee'] = function() use ($app) { |
|
192 | 192 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee'); |
193 | 193 | }; |
194 | - $app['eccube.repository.delivery_time'] = function () use ($app) { |
|
194 | + $app['eccube.repository.delivery_time'] = function() use ($app) { |
|
195 | 195 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime'); |
196 | 196 | }; |
197 | - $app['eccube.repository.payment'] = function () use ($app) { |
|
197 | + $app['eccube.repository.payment'] = function() use ($app) { |
|
198 | 198 | return $app['orm.em']->getRepository('Eccube\Entity\Payment'); |
199 | 199 | }; |
200 | - $app['eccube.repository.payment_option'] = function () use ($app) { |
|
200 | + $app['eccube.repository.payment_option'] = function() use ($app) { |
|
201 | 201 | return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption'); |
202 | 202 | }; |
203 | - $app['eccube.repository.category'] = function () use ($app) { |
|
203 | + $app['eccube.repository.category'] = function() use ($app) { |
|
204 | 204 | $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category'); |
205 | 205 | $CategoryRepository->setApplication($app); |
206 | 206 | |
207 | 207 | return $CategoryRepository; |
208 | 208 | }; |
209 | - $app['eccube.repository.customer'] = function () use ($app) { |
|
209 | + $app['eccube.repository.customer'] = function() use ($app) { |
|
210 | 210 | $customerRepository = $app['orm.em']->getRepository('Eccube\Entity\Customer'); |
211 | 211 | $customerRepository->setApplication($app); |
212 | 212 | return $customerRepository; |
213 | 213 | }; |
214 | - $app['eccube.repository.news'] = function () use ($app) { |
|
214 | + $app['eccube.repository.news'] = function() use ($app) { |
|
215 | 215 | return $app['orm.em']->getRepository('Eccube\Entity\News'); |
216 | 216 | }; |
217 | - $app['eccube.repository.mail_history'] = function () use ($app) { |
|
217 | + $app['eccube.repository.mail_history'] = function() use ($app) { |
|
218 | 218 | return $app['orm.em']->getRepository('Eccube\Entity\MailHistory'); |
219 | 219 | }; |
220 | - $app['eccube.repository.member'] = function () use ($app) { |
|
220 | + $app['eccube.repository.member'] = function() use ($app) { |
|
221 | 221 | $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member'); |
222 | 222 | $memberRepository->setEncoderFactorty($app['security.encoder_factory']); |
223 | 223 | return $memberRepository; |
224 | 224 | }; |
225 | - $app['eccube.repository.order'] = function () use ($app) { |
|
225 | + $app['eccube.repository.order'] = function() use ($app) { |
|
226 | 226 | return $app['orm.em']->getRepository('Eccube\Entity\Order'); |
227 | 227 | }; |
228 | - $app['eccube.repository.product'] = function () use ($app) { |
|
228 | + $app['eccube.repository.product'] = function() use ($app) { |
|
229 | 229 | $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product'); |
230 | 230 | $productRepository->setApplication($app); |
231 | 231 | |
232 | 232 | return $productRepository; |
233 | 233 | }; |
234 | - $app['eccube.repository.product_image'] = function () use ($app) { |
|
234 | + $app['eccube.repository.product_image'] = function() use ($app) { |
|
235 | 235 | return $app['orm.em']->getRepository('Eccube\Entity\ProductImage'); |
236 | 236 | }; |
237 | - $app['eccube.repository.product_class'] = function () use ($app) { |
|
237 | + $app['eccube.repository.product_class'] = function() use ($app) { |
|
238 | 238 | return $app['orm.em']->getRepository('Eccube\Entity\ProductClass'); |
239 | 239 | }; |
240 | - $app['eccube.repository.product_stock'] = function () use ($app) { |
|
240 | + $app['eccube.repository.product_stock'] = function() use ($app) { |
|
241 | 241 | return $app['orm.em']->getRepository('Eccube\Entity\ProductStock'); |
242 | 242 | }; |
243 | - $app['eccube.repository.product_tag'] = function () use ($app) { |
|
243 | + $app['eccube.repository.product_tag'] = function() use ($app) { |
|
244 | 244 | return $app['orm.em']->getRepository('Eccube\Entity\ProductTag'); |
245 | 245 | }; |
246 | - $app['eccube.repository.class_name'] = function () use ($app) { |
|
246 | + $app['eccube.repository.class_name'] = function() use ($app) { |
|
247 | 247 | return $app['orm.em']->getRepository('Eccube\Entity\ClassName'); |
248 | 248 | }; |
249 | - $app['eccube.repository.class_category'] = function () use ($app) { |
|
249 | + $app['eccube.repository.class_category'] = function() use ($app) { |
|
250 | 250 | return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory'); |
251 | 251 | }; |
252 | - $app['eccube.repository.customer_favorite_product'] = function () use ($app) { |
|
252 | + $app['eccube.repository.customer_favorite_product'] = function() use ($app) { |
|
253 | 253 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct'); |
254 | 254 | }; |
255 | - $app['eccube.repository.base_info'] = function () use ($app) { |
|
255 | + $app['eccube.repository.base_info'] = function() use ($app) { |
|
256 | 256 | $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo'); |
257 | 257 | $BaseInfoRepository->setApplication($app); |
258 | 258 | |
259 | 259 | return $BaseInfoRepository; |
260 | 260 | }; |
261 | - $app['eccube.repository.tax_rule'] = function () use ($app) { |
|
261 | + $app['eccube.repository.tax_rule'] = function() use ($app) { |
|
262 | 262 | $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule'); |
263 | 263 | $taxRuleRepository->setApplication($app); |
264 | 264 | |
265 | 265 | return $taxRuleRepository; |
266 | 266 | }; |
267 | - $app['eccube.repository.page_layout'] = function () use ($app) { |
|
267 | + $app['eccube.repository.page_layout'] = function() use ($app) { |
|
268 | 268 | $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout'); |
269 | 269 | $pageLayoutRepository->setApplication($app); |
270 | 270 | |
271 | 271 | return $pageLayoutRepository; |
272 | 272 | }; |
273 | - $app['eccube.repository.block'] = function () use ($app) { |
|
273 | + $app['eccube.repository.block'] = function() use ($app) { |
|
274 | 274 | $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block'); |
275 | 275 | $blockRepository->setApplication($app); |
276 | 276 | |
277 | 277 | return $blockRepository; |
278 | 278 | }; |
279 | - $app['eccube.repository.order'] = function () use ($app) { |
|
279 | + $app['eccube.repository.order'] = function() use ($app) { |
|
280 | 280 | $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order'); |
281 | 281 | $orderRepository->setApplication($app); |
282 | 282 | |
283 | 283 | return $orderRepository; |
284 | 284 | }; |
285 | - $app['eccube.repository.customer_address'] = function () use ($app) { |
|
285 | + $app['eccube.repository.customer_address'] = function() use ($app) { |
|
286 | 286 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress'); |
287 | 287 | }; |
288 | - $app['eccube.repository.shipping'] = function () use ($app) { |
|
288 | + $app['eccube.repository.shipping'] = function() use ($app) { |
|
289 | 289 | return $app['orm.em']->getRepository('Eccube\Entity\Shipping'); |
290 | 290 | }; |
291 | - $app['eccube.repository.shipment_item'] = function () use ($app) { |
|
291 | + $app['eccube.repository.shipment_item'] = function() use ($app) { |
|
292 | 292 | return $app['orm.em']->getRepository('Eccube\Entity\ShipmentItem'); |
293 | 293 | }; |
294 | - $app['eccube.repository.customer_status'] = function () use ($app) { |
|
294 | + $app['eccube.repository.customer_status'] = function() use ($app) { |
|
295 | 295 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus'); |
296 | 296 | }; |
297 | - $app['eccube.repository.order_status'] = function () use ($app) { |
|
297 | + $app['eccube.repository.order_status'] = function() use ($app) { |
|
298 | 298 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
299 | 299 | }; |
300 | - $app['eccube.repository.mail_template'] = function () use ($app) { |
|
300 | + $app['eccube.repository.mail_template'] = function() use ($app) { |
|
301 | 301 | return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate'); |
302 | 302 | }; |
303 | - $app['eccube.repository.csv'] = function () use ($app) { |
|
303 | + $app['eccube.repository.csv'] = function() use ($app) { |
|
304 | 304 | return $app['orm.em']->getRepository('Eccube\Entity\Csv'); |
305 | 305 | }; |
306 | - $app['eccube.repository.template'] = function () use ($app) { |
|
306 | + $app['eccube.repository.template'] = function() use ($app) { |
|
307 | 307 | return $app['orm.em']->getRepository('Eccube\Entity\Template'); |
308 | 308 | }; |
309 | - $app['eccube.repository.authority_role'] = function () use ($app) { |
|
309 | + $app['eccube.repository.authority_role'] = function() use ($app) { |
|
310 | 310 | return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole'); |
311 | 311 | }; |
312 | 312 | |
313 | - $app['paginator'] = $app->protect(function () { |
|
313 | + $app['paginator'] = $app->protect(function() { |
|
314 | 314 | $paginator = new \Knp\Component\Pager\Paginator(); |
315 | 315 | $paginator->subscribe(new \Eccube\EventListener\PaginatorListener()); |
316 | 316 | |
317 | 317 | return $paginator; |
318 | 318 | }); |
319 | 319 | |
320 | - $app['eccube.repository.help'] = function () use ($app) { |
|
320 | + $app['eccube.repository.help'] = function() use ($app) { |
|
321 | 321 | return $app['orm.em']->getRepository('Eccube\Entity\Help'); |
322 | 322 | }; |
323 | - $app['eccube.repository.plugin'] = function () use ($app) { |
|
323 | + $app['eccube.repository.plugin'] = function() use ($app) { |
|
324 | 324 | return $app['orm.em']->getRepository('Eccube\Entity\Plugin'); |
325 | 325 | }; |
326 | - $app['eccube.repository.plugin_event_handler'] = function () use ($app) { |
|
326 | + $app['eccube.repository.plugin_event_handler'] = function() use ($app) { |
|
327 | 327 | return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler'); |
328 | 328 | }; |
329 | - $app['eccube.repository.layout'] = function () use ($app) { |
|
329 | + $app['eccube.repository.layout'] = function() use ($app) { |
|
330 | 330 | return $app['orm.em']->getRepository('Eccube\Entity\Layout'); |
331 | 331 | }; |
332 | 332 | |
333 | - $app['request_scope'] = function () { |
|
333 | + $app['request_scope'] = function() { |
|
334 | 334 | return new ParameterBag(); |
335 | 335 | }; |
336 | 336 | // TODO 使用するか検討 |
337 | - $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) { |
|
337 | + $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) { |
|
338 | 338 | $compiler |
339 | 339 | ->addDebugInfo($node) |
340 | 340 | ->write("echo 'Helloooooo ' . ") |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | |
345 | 345 | }); |
346 | 346 | // TODO 使用するか検討 |
347 | - $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) { |
|
347 | + $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) { |
|
348 | 348 | $compiler |
349 | 349 | ->addDebugInfo($node) |
350 | 350 | ->write("echo 'jirooooooo ' . ") |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | }); |
356 | 356 | |
357 | 357 | // TODO 使用するか検討 |
358 | - $app['eccube.twig.generic_node_names'] = function () use ($app) { |
|
358 | + $app['eccube.twig.generic_node_names'] = function() use ($app) { |
|
359 | 359 | return [ |
360 | 360 | 'hello', |
361 | 361 | 'jiro', |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | }; |
365 | 365 | |
366 | 366 | // TODO 使用するか検討 |
367 | - $app['twig_parsers'] = function () use ($app) { |
|
367 | + $app['twig_parsers'] = function() use ($app) { |
|
368 | 368 | $GenericTokenParsers = []; |
369 | 369 | foreach ($app['eccube.twig.generic_node_names'] as $tagName) { |
370 | 370 | $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName); |
@@ -373,20 +373,20 @@ discard block |
||
373 | 373 | }; |
374 | 374 | |
375 | 375 | // TODO ServiceProvider から追加できるよう Collection にする |
376 | - $app['eccube.twig.block.templates'] = function () { |
|
376 | + $app['eccube.twig.block.templates'] = function() { |
|
377 | 377 | return [ |
378 | 378 | 'render_block.twig', |
379 | 379 | ]; |
380 | 380 | }; |
381 | 381 | |
382 | 382 | // Form\Type |
383 | - $app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
383 | + $app->extend('form.type.extensions', function($extensions) use ($app) { |
|
384 | 384 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
385 | 385 | $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension(); |
386 | 386 | $extensions[] = new \Eccube\Form\Extension\DoctrineOrmExtension($app['orm.em']); |
387 | 387 | return $extensions; |
388 | 388 | }); |
389 | - $app->extend('form.types', function ($types) use ($app) { |
|
389 | + $app->extend('form.types', function($types) use ($app) { |
|
390 | 390 | $types[] = new \Eccube\Form\Type\NameType($app['config']); |
391 | 391 | $types[] = new \Eccube\Form\Type\KanaType($app['config']); |
392 | 392 | $types[] = new \Eccube\Form\Type\TelType($app['config']); |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | return $types; |
490 | 490 | }); |
491 | 491 | $app['eccube.entity.event.dispatcher']->addEventListener(new \Acme\Entity\SoldOutEventListener()); |
492 | - $app['eccube.queries'] = function () { |
|
492 | + $app['eccube.queries'] = function() { |
|
493 | 493 | return new \Eccube\Doctrine\Query\Queries(); |
494 | 494 | }; |
495 | 495 | // TODO QueryCustomizerの追加方法は要検討 |
@@ -45,7 +45,7 @@ |
||
45 | 45 | public function hasProductByName($productName) |
46 | 46 | { |
47 | 47 | $ShipmentItems = array_filter($this->getArrayCopy(), |
48 | - function ($ShipmentItem) use ($productName) { |
|
48 | + function($ShipmentItem) use ($productName) { |
|
49 | 49 | /* @var ShipmentItem $ShipmentItem */ |
50 | 50 | return $ShipmentItem->getProductName() == $productName; |
51 | 51 | }); |
@@ -24,7 +24,7 @@ |
||
24 | 24 | } |
25 | 25 | |
26 | 26 | /** @var ShipmentItem $ShipmentItem */ |
27 | - foreach($this->ShipmentItems as $ShipmentItem) { |
|
27 | + foreach ($this->ShipmentItems as $ShipmentItem) { |
|
28 | 28 | if (!$this->Order->getShipmentItems()->contains($ShipmentItem)) { |
29 | 29 | $ShipmentItem->setOrder($this->Order); |
30 | 30 | $this->Order->addShipmentItem($ShipmentItem); |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | ->setParameter('order_id_start', $searchData['order_id_start']); |
51 | 51 | } |
52 | 52 | // multi |
53 | - if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
53 | + if (isset($searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
54 | 54 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
55 | 55 | $qb |
56 | - ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' . |
|
56 | + ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR '. |
|
57 | 57 | 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') |
58 | 58 | ->setParameter('multi', $multi) |
59 | - ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); |
|
59 | + ->setParameter('likemulti', '%'.$searchData['multi'].'%'); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | // order_id_end |
@@ -70,28 +70,28 @@ discard block |
||
70 | 70 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
71 | 71 | $qb |
72 | 72 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
73 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
73 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | // kana |
77 | 77 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
78 | 78 | $qb |
79 | 79 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
80 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
80 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
84 | 84 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
85 | 85 | $qb |
86 | 86 | ->andWhere('o.email like :email') |
87 | - ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
87 | + ->setParameter('email', '%'.$searchData['email'].'%'); |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | // tel |
91 | 91 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
92 | 92 | $qb |
93 | 93 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
94 | - ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
94 | + ->setParameter('tel', '%'.$searchData['tel'].'%'); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | // sex |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | $qb |
196 | 196 | ->leftJoin('o.OrderDetails', 'od') |
197 | 197 | ->andWhere('od.product_name LIKE :buy_product_name') |
198 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
198 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
199 | 199 | } |
200 | 200 | |
201 | 201 | // Order By |