@@ -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); |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | |
62 | 62 | public function __construct() |
63 | 63 | { |
64 | - $this->config_path = __DIR__ . '/../../../../app/config/eccube'; |
|
65 | - $this->dist_path = __DIR__ . '/../../Resource/config'; |
|
66 | - $this->cache_path = __DIR__ . '/../../../../app/cache'; |
|
64 | + $this->config_path = __DIR__.'/../../../../app/config/eccube'; |
|
65 | + $this->dist_path = __DIR__.'/../../Resource/config'; |
|
66 | + $this->cache_path = __DIR__.'/../../../../app/cache'; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | private function isValid(Request $request, Form $form) |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | return $app['twig']->render('step1.twig', array( |
115 | 115 | 'form' => $form->createView(), |
116 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
116 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
117 | 117 | )); |
118 | 118 | } |
119 | 119 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | return $app['twig']->render('step2.twig', array( |
138 | 138 | 'protectedDirs' => $protectedDirs, |
139 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
139 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
140 | 140 | )); |
141 | 141 | } |
142 | 142 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | |
151 | 151 | if (empty($sessionData['shop_name'])) { |
152 | 152 | |
153 | - $config_file = $this->config_path . '/config.yml'; |
|
153 | + $config_file = $this->config_path.'/config.yml'; |
|
154 | 154 | $fs = new Filesystem(); |
155 | 155 | |
156 | 156 | if ($fs->exists($config_file)) { |
@@ -164,11 +164,11 @@ discard block |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | // セキュリティの設定 |
167 | - $config_file = $this->config_path . '/path.yml'; |
|
167 | + $config_file = $this->config_path.'/path.yml'; |
|
168 | 168 | $config = Yaml::parse(file_get_contents($config_file)); |
169 | 169 | $sessionData['admin_dir'] = $config['admin_route']; |
170 | 170 | |
171 | - $config_file = $this->config_path . '/config.yml'; |
|
171 | + $config_file = $this->config_path.'/config.yml'; |
|
172 | 172 | $config = Yaml::parse(file_get_contents($config_file)); |
173 | 173 | |
174 | 174 | $allowHost = $config['admin_allow_host']; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | |
180 | 180 | // ロードバランサー、プロキシサーバ設定 |
181 | 181 | if (isset($config['trusted_proxies_connection_only'])) { |
182 | - $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only']; |
|
182 | + $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only']; |
|
183 | 183 | } |
184 | 184 | if (isset($config['trusted_proxies'])) { |
185 | 185 | $trustedProxies = $config['trusted_proxies']; |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | } |
189 | 189 | } |
190 | 190 | // メール設定 |
191 | - $config_file = $this->config_path . '/mail.yml'; |
|
191 | + $config_file = $this->config_path.'/mail.yml'; |
|
192 | 192 | $config = Yaml::parse(file_get_contents($config_file)); |
193 | 193 | $mail = $config['mail']; |
194 | 194 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | |
212 | 212 | return $app['twig']->render('step3.twig', array( |
213 | 213 | 'form' => $form->createView(), |
214 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
214 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
215 | 215 | )); |
216 | 216 | } |
217 | 217 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | |
227 | 227 | if (empty($sessionData['database'])) { |
228 | 228 | |
229 | - $config_file = $this->config_path . '/database.yml'; |
|
229 | + $config_file = $this->config_path.'/database.yml'; |
|
230 | 230 | $fs = new Filesystem(); |
231 | 231 | |
232 | 232 | if ($fs->exists($config_file)) { |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | |
255 | 255 | return $app['twig']->render('step4.twig', array( |
256 | 256 | 'form' => $form->createView(), |
257 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
257 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
258 | 258 | )); |
259 | 259 | } |
260 | 260 | |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $host = $request->getSchemeAndHttpHost(); |
302 | 302 | $basePath = $request->getBasePath(); |
303 | 303 | $params = array( |
304 | - 'http_url' => $host . $basePath, |
|
304 | + 'http_url' => $host.$basePath, |
|
305 | 305 | 'shop_name' => $sessionData['shop_name'], |
306 | 306 | ); |
307 | 307 | |
@@ -316,16 +316,16 @@ discard block |
||
316 | 316 | |
317 | 317 | return $app['twig']->render('step5.twig', array( |
318 | 318 | 'form' => $form->createView(), |
319 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
319 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
320 | 320 | )); |
321 | 321 | } |
322 | 322 | |
323 | 323 | // インストール完了 |
324 | 324 | public function complete(InstallApplication $app, Request $request) |
325 | 325 | { |
326 | - $config_yml = $this->config_path . '/config.yml'; |
|
326 | + $config_yml = $this->config_path.'/config.yml'; |
|
327 | 327 | $config = Yaml::parse(file_get_contents($config_yml)); |
328 | - $config_path = $this->config_path . '/path.yml'; |
|
328 | + $config_path = $this->config_path.'/path.yml'; |
|
329 | 329 | $path_yml = Yaml::parse(file_get_contents($config_path)); |
330 | 330 | |
331 | 331 | $config = array_replace_recursive($path_yml, $config); |
@@ -340,11 +340,11 @@ discard block |
||
340 | 340 | $host = $request->getSchemeAndHttpHost(); |
341 | 341 | $basePath = $request->getBasePath(); |
342 | 342 | |
343 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
343 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
344 | 344 | |
345 | 345 | return $app['twig']->render('complete.twig', array( |
346 | 346 | 'admin_url' => $adminUrl, |
347 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
347 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
348 | 348 | )); |
349 | 349 | } |
350 | 350 | |
@@ -360,12 +360,12 @@ discard block |
||
360 | 360 | { |
361 | 361 | foreach ($this->required_modules as $module) { |
362 | 362 | if (!extension_loaded($module)) { |
363 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
363 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
364 | 364 | } |
365 | 365 | } |
366 | 366 | |
367 | 367 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
368 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
368 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
369 | 369 | } |
370 | 370 | |
371 | 371 | foreach ($this->recommended_module as $module) { |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | if (!function_exists('apache_get_modules')) { |
394 | 394 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
395 | 395 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
396 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
396 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
397 | 397 | } |
398 | 398 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
399 | 399 | // iis |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | private function setPDO() |
406 | 406 | { |
407 | - $config_file = $this->config_path . '/database.yml'; |
|
407 | + $config_file = $this->config_path.'/database.yml'; |
|
408 | 408 | $config = Yaml::parse(file_get_contents($config_file)); |
409 | 409 | |
410 | 410 | try { |
@@ -439,7 +439,7 @@ discard block |
||
439 | 439 | private function getEntityManager() |
440 | 440 | { |
441 | 441 | if (!isset($this->app['orm.em'])) { |
442 | - $config_file = $this->config_path . '/database.yml'; |
|
442 | + $config_file = $this->config_path.'/database.yml'; |
|
443 | 443 | $database = Yaml::parse(file_get_contents($config_file)); |
444 | 444 | |
445 | 445 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -451,7 +451,7 @@ discard block |
||
451 | 451 | 'type' => 'annotation', |
452 | 452 | 'namespace' => 'Eccube\Entity', |
453 | 453 | 'path' => array( |
454 | - __DIR__ . '/../../Entity', |
|
454 | + __DIR__.'/../../Entity', |
|
455 | 455 | ), |
456 | 456 | 'use_simple_annotation_reader' => false, |
457 | 457 | ), |
@@ -484,7 +484,7 @@ discard block |
||
484 | 484 | } |
485 | 485 | } |
486 | 486 | $this->app->register(new \Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
487 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
487 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
488 | 488 | 'orm.em.options' => array( |
489 | 489 | 'mappings' => $ormMappings |
490 | 490 | ) |
@@ -524,11 +524,11 @@ discard block |
||
524 | 524 | { |
525 | 525 | $this->resetNatTimer(); |
526 | 526 | |
527 | - $config_file = $this->config_path . '/database.yml'; |
|
527 | + $config_file = $this->config_path.'/database.yml'; |
|
528 | 528 | $database = Yaml::parse(file_get_contents($config_file)); |
529 | 529 | $config['database'] = $database['database']; |
530 | 530 | |
531 | - $config_file = $this->config_path . '/config.yml'; |
|
531 | + $config_file = $this->config_path.'/config.yml'; |
|
532 | 532 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
533 | 533 | $config['config'] = $baseConfig; |
534 | 534 | |
@@ -586,11 +586,11 @@ discard block |
||
586 | 586 | { |
587 | 587 | $this->resetNatTimer(); |
588 | 588 | |
589 | - $config_file = $this->config_path . '/database.yml'; |
|
589 | + $config_file = $this->config_path.'/database.yml'; |
|
590 | 590 | $database = Yaml::parse(file_get_contents($config_file)); |
591 | 591 | $config['database'] = $database['database']; |
592 | 592 | |
593 | - $config_file = $this->config_path . '/config.yml'; |
|
593 | + $config_file = $this->config_path.'/config.yml'; |
|
594 | 594 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
595 | 595 | $config['config'] = $baseConfig; |
596 | 596 | |
@@ -653,7 +653,7 @@ discard block |
||
653 | 653 | $config = new Configuration($app['db']); |
654 | 654 | $config->setMigrationsNamespace('DoctrineMigrations'); |
655 | 655 | |
656 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
656 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
657 | 657 | $config->setMigrationsDirectory($migrationDir); |
658 | 658 | $config->registerMigrationsFromDirectory($migrationDir); |
659 | 659 | |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | private function getProtectedDirs() |
687 | 687 | { |
688 | 688 | $protectedDirs = array(); |
689 | - $base = __DIR__ . '/../../../..'; |
|
689 | + $base = __DIR__.'/../../../..'; |
|
690 | 690 | $dirs = array( |
691 | 691 | '/html', |
692 | 692 | '/app', |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | ); |
700 | 700 | |
701 | 701 | foreach ($dirs as $dir) { |
702 | - if (!is_writable($base . $dir)) { |
|
702 | + if (!is_writable($base.$dir)) { |
|
703 | 703 | $protectedDirs[] = $dir; |
704 | 704 | } |
705 | 705 | } |
@@ -710,7 +710,7 @@ discard block |
||
710 | 710 | private function createConfigYamlFile($data, $auth = true) |
711 | 711 | { |
712 | 712 | $fs = new Filesystem(); |
713 | - $config_file = $this->config_path . '/config.yml'; |
|
713 | + $config_file = $this->config_path.'/config.yml'; |
|
714 | 714 | |
715 | 715 | if ($fs->exists($config_file)) { |
716 | 716 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | |
752 | 752 | $fs = new Filesystem(); |
753 | 753 | $content = str_replace( |
754 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
754 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
755 | 755 | ); |
756 | 756 | $fs->dumpFile($config_file, $content); |
757 | 757 | |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | |
768 | 768 | private function addInstallStatus() |
769 | 769 | { |
770 | - $config_file = $this->config_path . '/config.yml'; |
|
770 | + $config_file = $this->config_path.'/config.yml'; |
|
771 | 771 | $config = Yaml::parse(file_get_contents($config_file)); |
772 | 772 | $config['eccube_install'] = 1; |
773 | 773 | $yml = Yaml::dump($config); |
@@ -779,7 +779,7 @@ discard block |
||
779 | 779 | private function createDatabaseYamlFile($data) |
780 | 780 | { |
781 | 781 | $fs = new Filesystem(); |
782 | - $config_file = $this->config_path . '/database.yml'; |
|
782 | + $config_file = $this->config_path.'/database.yml'; |
|
783 | 783 | if ($fs->exists($config_file)) { |
784 | 784 | $fs->remove($config_file); |
785 | 785 | } |
@@ -812,14 +812,14 @@ discard block |
||
812 | 812 | |
813 | 813 | $fs = new Filesystem(); |
814 | 814 | $content = str_replace( |
815 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
815 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
816 | 816 | ); |
817 | 817 | } else { |
818 | 818 | $content = Yaml::dump( |
819 | 819 | array( |
820 | 820 | 'database' => array( |
821 | 821 | 'driver' => 'pdo_sqlite', |
822 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
822 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
823 | 823 | ) |
824 | 824 | ) |
825 | 825 | ); |
@@ -832,7 +832,7 @@ discard block |
||
832 | 832 | private function createMailYamlFile($data) |
833 | 833 | { |
834 | 834 | $fs = new Filesystem(); |
835 | - $config_file = $this->config_path . '/mail.yml'; |
|
835 | + $config_file = $this->config_path.'/mail.yml'; |
|
836 | 836 | if ($fs->exists($config_file)) { |
837 | 837 | $fs->remove($config_file); |
838 | 838 | } |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | |
848 | 848 | $fs = new Filesystem(); |
849 | 849 | $content = str_replace( |
850 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
850 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
851 | 851 | ); |
852 | 852 | $fs->dumpFile($config_file, $content); |
853 | 853 | |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | private function createPathYamlFile($data, Request $request) |
858 | 858 | { |
859 | 859 | $fs = new Filesystem(); |
860 | - $config_file = $this->config_path . '/path.yml'; |
|
860 | + $config_file = $this->config_path.'/path.yml'; |
|
861 | 861 | if ($fs->exists($config_file)) { |
862 | 862 | $fs->remove($config_file); |
863 | 863 | } |
@@ -867,14 +867,14 @@ discard block |
||
867 | 867 | $USER_DATA_ROUTE = 'user_data'; |
868 | 868 | $ROOT_DIR = '%ROOT_DIR%'; |
869 | 869 | $ROOT_URLPATH = $request->getBasePath(); |
870 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
870 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
871 | 871 | |
872 | 872 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
873 | 873 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
874 | 874 | |
875 | 875 | $fs = new Filesystem(); |
876 | 876 | $content = str_replace( |
877 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
877 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
878 | 878 | ); |
879 | 879 | $fs->dumpFile($config_file, $content); |
880 | 880 | |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | |
884 | 884 | private function sendAppData($params) |
885 | 885 | { |
886 | - $config_file = $this->config_path . '/database.yml'; |
|
886 | + $config_file = $this->config_path.'/database.yml'; |
|
887 | 887 | $db_config = Yaml::parse(file_get_contents($config_file)); |
888 | 888 | |
889 | 889 | $this->setPDO(); |
@@ -895,7 +895,7 @@ discard block |
||
895 | 895 | } |
896 | 896 | |
897 | 897 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
898 | - $db_ver = 'MySQL:' . $version; |
|
898 | + $db_ver = 'MySQL:'.$version; |
|
899 | 899 | } else { |
900 | 900 | $db_ver = $version; |
901 | 901 | } |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | |
914 | 914 | $header = array( |
915 | 915 | 'Content-Type: application/x-www-form-urlencoded', |
916 | - 'Content-Length: ' . strlen($data), |
|
916 | + 'Content-Length: '.strlen($data), |
|
917 | 917 | ); |
918 | 918 | $context = stream_context_create( |
919 | 919 | array( |
@@ -940,7 +940,7 @@ discard block |
||
940 | 940 | public function migration(InstallApplication $app, Request $request) |
941 | 941 | { |
942 | 942 | return $app['twig']->render('migration.twig', array( |
943 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
943 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
944 | 944 | )); |
945 | 945 | } |
946 | 946 | |
@@ -969,7 +969,7 @@ discard block |
||
969 | 969 | return $app['twig']->render('migration_plugin.twig', array( |
970 | 970 | 'Plugins' => $Plugins, |
971 | 971 | 'version' => Constant::VERSION, |
972 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
972 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
973 | 973 | )); |
974 | 974 | } |
975 | 975 | } |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | \Eccube\Util\Cache::clear($config_app, true); |
993 | 993 | |
994 | 994 | return $app['twig']->render('migration_end.twig', array( |
995 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
995 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
996 | 996 | )); |
997 | 997 | } |
998 | 998 | } |
@@ -52,13 +52,13 @@ discard block |
||
52 | 52 | ->setParameter('shipping_id_start', $searchData['shipping_id_start']); |
53 | 53 | } |
54 | 54 | // multi |
55 | - if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
55 | + if (isset($searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
56 | 56 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
57 | 57 | $qb |
58 | - ->andWhere('s.id = :multi OR s.name01 LIKE :likemulti OR s.name02 LIKE :likemulti OR ' . |
|
58 | + ->andWhere('s.id = :multi OR s.name01 LIKE :likemulti OR s.name02 LIKE :likemulti OR '. |
|
59 | 59 | 's.kana01 LIKE :likemulti OR s.kana02 LIKE :likemulti OR s.company_name LIKE :likemulti') |
60 | 60 | ->setParameter('multi', $multi) |
61 | - ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); |
|
61 | + ->setParameter('likemulti', '%'.$searchData['multi'].'%'); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | // shipping_id_end |
@@ -91,42 +91,42 @@ discard block |
||
91 | 91 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
92 | 92 | $qb |
93 | 93 | ->andWhere('CONCAT(s.name01, s.name02) LIKE :name') |
94 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
94 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | // kana |
98 | 98 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
99 | 99 | $qb |
100 | 100 | ->andWhere('CONCAT(s.kana01, s.kana02) LIKE :kana') |
101 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
101 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | // order_name |
105 | 105 | if (isset($searchData['order_name']) && Str::isNotBlank($searchData['order_name'])) { |
106 | 106 | $qb |
107 | 107 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :order_name') |
108 | - ->setParameter('order_name', '%' . $searchData['order_name'] . '%'); |
|
108 | + ->setParameter('order_name', '%'.$searchData['order_name'].'%'); |
|
109 | 109 | } |
110 | 110 | |
111 | 111 | // order_kana |
112 | 112 | if (isset($searchData['order_kana']) && Str::isNotBlank($searchData['order_kana'])) { |
113 | 113 | $qb |
114 | 114 | ->andWhere('CONCAT(o.kana01, s.kana02) LIKE :order_kana') |
115 | - ->setParameter('kana', '%' . $searchData['order_kana'] . '%'); |
|
115 | + ->setParameter('kana', '%'.$searchData['order_kana'].'%'); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | // order_email |
119 | 119 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
120 | 120 | $qb |
121 | 121 | ->andWhere('o.email like :email') |
122 | - ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
122 | + ->setParameter('email', '%'.$searchData['email'].'%'); |
|
123 | 123 | } |
124 | 124 | |
125 | 125 | // tel |
126 | 126 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
127 | 127 | $qb |
128 | 128 | ->andWhere('CONCAT(s.tel01, s.tel02, s.tel03) LIKE :tel') |
129 | - ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
129 | + ->setParameter('tel', '%'.$searchData['tel'].'%'); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | // payment |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | if (isset($searchData['buy_product_name']) && Str::isNotBlank($searchData['buy_product_name'])) { |
223 | 223 | $qb |
224 | 224 | ->andWhere('si.product_name LIKE :buy_product_name') |
225 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
225 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | // Order By |