@@ -25,8 +25,6 @@ discard block |
||
25 | 25 | |
26 | 26 | use Eccube\Application\ApplicationTrait; |
27 | 27 | use Eccube\Common\Constant; |
28 | -use Eccube\Doctrine\ORM\Mapping\Driver\YamlDriver; |
|
29 | -use Eccube\EventListener\TransactionListener; |
|
30 | 28 | use Eccube\Plugin\ConfigManager as PluginConfigManager; |
31 | 29 | use Eccube\Routing\EccubeRouter; |
32 | 30 | use Eccube\ServiceProvider\MobileDetectServiceProvider; |
@@ -37,13 +35,11 @@ discard block |
||
37 | 35 | use Sergiors\Silex\Provider\TemplatingServiceProvider; |
38 | 36 | use Sergiors\Silex\Routing\ChainUrlGenerator; |
39 | 37 | use Sergiors\Silex\Routing\ChainUrlMatcher; |
40 | -use Symfony\Component\EventDispatcher\EventDispatcher; |
|
41 | 38 | use Symfony\Component\Finder\Finder; |
42 | 39 | use Symfony\Component\HttpFoundation\Request; |
43 | 40 | use Symfony\Component\HttpFoundation\Response; |
44 | 41 | use Symfony\Component\HttpKernel\Event\FilterResponseEvent; |
45 | 42 | use Symfony\Component\HttpKernel\Event\GetResponseEvent; |
46 | -use Symfony\Component\HttpKernel\Event\PostResponseEvent; |
|
47 | 43 | use Symfony\Component\HttpKernel\KernelEvents; |
48 | 44 | use Symfony\Component\Yaml\Yaml; |
49 | 45 |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | $this->register(new \Silex\Provider\ValidatorServiceProvider()); |
163 | 163 | $this->register(new MobileDetectServiceProvider()); |
164 | 164 | |
165 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
165 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
166 | 166 | if ($this['debug']) { |
167 | 167 | return; |
168 | 168 | } |
@@ -256,14 +256,14 @@ discard block |
||
256 | 256 | return $router; |
257 | 257 | }); |
258 | 258 | |
259 | - $this['eccube.router.origin'] = function ($app) { |
|
259 | + $this['eccube.router.origin'] = function($app) { |
|
260 | 260 | $resource = __DIR__.'/Controller'; |
261 | 261 | $cachePrefix = 'Origin'; |
262 | 262 | |
263 | 263 | return $app['eccube.router']($resource, $cachePrefix); |
264 | 264 | }; |
265 | 265 | |
266 | - $this['eccube.routers.plugin'] = function ($app) { |
|
266 | + $this['eccube.routers.plugin'] = function($app) { |
|
267 | 267 | // TODO 有効なプラグインを対象とする必要がある. |
268 | 268 | $dirs = Finder::create() |
269 | 269 | ->in($app['config']['root_dir'].'/app/Plugin') |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | return $routers; |
281 | 281 | }; |
282 | 282 | |
283 | - $this['eccube.router.extend'] = function ($app) { |
|
283 | + $this['eccube.router.extend'] = function($app) { |
|
284 | 284 | // TODO ディレクトリ名は暫定 |
285 | 285 | $resource = $app['config']['root_dir'].'/app/Acme/Controller'; |
286 | 286 | $cachePrefix = 'Extend'; |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | return $router; |
291 | 291 | }; |
292 | 292 | |
293 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
293 | + $this->extend('request_matcher', function($matcher, $app) { |
|
294 | 294 | $matchers = []; |
295 | 295 | $matchers[] = $app['eccube.router.extend']; |
296 | 296 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | return new ChainUrlMatcher($matchers, $app['request_context']); |
303 | 303 | }); |
304 | 304 | |
305 | - $this->extend('url_generator', function ($generator, $app) { |
|
305 | + $this->extend('url_generator', function($generator, $app) { |
|
306 | 306 | $generators = []; |
307 | 307 | $generators[] = $app['eccube.router.extend']; |
308 | 308 | foreach ($app['eccube.routers.plugin'] as $router) { |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
334 | 334 | 'locale_fallbacks' => ['ja', 'en'], |
335 | 335 | )); |
336 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
336 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
337 | 337 | $translator->addLoader('yaml', new \Symfony\Component\Translation\Loader\YamlFileLoader()); |
338 | 338 | |
339 | 339 | $file = __DIR__.'/Resource/locale/validator.'.$app['locale'].'.yml'; |
@@ -380,14 +380,14 @@ discard block |
||
380 | 380 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
381 | 381 | 'twig.form.templates' => array('Form/form_layout.twig'), |
382 | 382 | )); |
383 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
383 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
384 | 384 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
385 | 385 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
386 | 386 | |
387 | 387 | return $twig; |
388 | 388 | }); |
389 | 389 | |
390 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
390 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
391 | 391 | $app['admin'] = false; |
392 | 392 | $app['front'] = false; |
393 | 393 | $pathinfo = rawurldecode($request->getPathInfo()); |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | // フロント or 管理画面ごとにtwigの探索パスを切り替える. |
420 | 420 | if (!$app->offsetExists('twig')) { |
421 | 421 | |
422 | - $app->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
422 | + $app->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
423 | 423 | $paths = array(); |
424 | 424 | |
425 | 425 | // 互換性がないのでprofiler とproduction 時のcacheを分離する |
@@ -466,7 +466,7 @@ discard block |
||
466 | 466 | }, self::EARLY_EVENT); |
467 | 467 | |
468 | 468 | // twigのグローバル変数を定義. |
469 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
469 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
470 | 470 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
471 | 471 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
472 | 472 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
534 | 534 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
535 | 535 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
536 | - \Swift::init(function () { |
|
536 | + \Swift::init(function() { |
|
537 | 537 | \Swift_DependencyContainer::getInstance() |
538 | 538 | ->register('mime.qpheaderencoder') |
539 | 539 | ->asAliasOf('mime.base64headerencoder'); |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | 'EXTRACT' => 'Eccube\Doctrine\ORM\Query\Extract', |
661 | 661 | ), |
662 | 662 | )); |
663 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
663 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
664 | 664 | // tax_rule |
665 | 665 | $taxRuleRepository = $em->getRepository('Eccube\Entity\TaxRule'); |
666 | 666 | $taxRuleRepository->setApplication($app); |
@@ -756,31 +756,31 @@ discard block |
||
756 | 756 | array('^/mypage', 'ROLE_USER', $channel), |
757 | 757 | ); |
758 | 758 | |
759 | - $this['eccube.password_encoder'] = function ($app) { |
|
759 | + $this['eccube.password_encoder'] = function($app) { |
|
760 | 760 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
761 | 761 | }; |
762 | - $this['security.encoder_factory'] = function ($app) { |
|
762 | + $this['security.encoder_factory'] = function($app) { |
|
763 | 763 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
764 | 764 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
765 | 765 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
766 | 766 | )); |
767 | 767 | }; |
768 | - $this['eccube.event_listner.security'] = function ($app) { |
|
768 | + $this['eccube.event_listner.security'] = function($app) { |
|
769 | 769 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
770 | 770 | }; |
771 | 771 | |
772 | 772 | // Voterの設定 |
773 | - $this['authority_voter'] = function ($app) { |
|
773 | + $this['authority_voter'] = function($app) { |
|
774 | 774 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
775 | 775 | }; |
776 | 776 | |
777 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
777 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
778 | 778 | $voters[] = $app['authority_voter']; |
779 | 779 | |
780 | 780 | return $voters; |
781 | 781 | }); |
782 | 782 | |
783 | - $this['security.access_manager'] = function ($app) { |
|
783 | + $this['security.access_manager'] = function($app) { |
|
784 | 784 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
785 | 785 | }; |
786 | 786 | |
@@ -794,7 +794,7 @@ discard block |
||
794 | 794 | { |
795 | 795 | $config = $this['config']; |
796 | 796 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
797 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) { |
|
797 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) { |
|
798 | 798 | // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する |
799 | 799 | Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies'])); |
800 | 800 | }, self::EARLY_EVENT); |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | $app = $this; |
955 | 955 | |
956 | 956 | // Response Event(http cache対応、event実行は一番遅く設定) |
957 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
957 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
958 | 958 | |
959 | 959 | if (!$event->isMasterRequest()) { |
960 | 960 | return; |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | /** |
234 | - * @param \Eccube\Entity\ProductClass|integer $ProductClass |
|
234 | + * @param string $ProductClass |
|
235 | 235 | * @param integer $quantity |
236 | 236 | * @return \Eccube\Service\CartService |
237 | 237 | * @throws CartException |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | * 在庫数と販売制限数ともに個数が超えていれば、少ない方を適用させてメッセージを表示する |
646 | 646 | * |
647 | 647 | * @param ProductClass $ProductClass |
648 | - * @param $productName |
|
648 | + * @param string $productName |
|
649 | 649 | * @param $quantity |
650 | 650 | * @return int チェック後に更新した個数 |
651 | 651 | */ |
@@ -302,7 +302,7 @@ |
||
302 | 302 | // 制限数チェック(在庫不足の場合は、処理の中でカート内商品を削除している) |
303 | 303 | $quantity = $this->setProductLimit($ProductClass, $productName, $tmp_quantity); |
304 | 304 | |
305 | - // 新しい数量でカート内商品を登録する |
|
305 | + // 新しい数量でカート内商品を登録する |
|
306 | 306 | if (0 < $quantity) { |
307 | 307 | $CartItem = new CartItem(); |
308 | 308 | $CartItem |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | */ |
223 | 223 | public function getProductQuantity($productClassId) |
224 | 224 | { |
225 | - $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId); |
|
225 | + $CartItem = $this->cart->getCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId); |
|
226 | 226 | if ($CartItem) { |
227 | 227 | return $CartItem->getQuantity(); |
228 | 228 | } else { |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | $CartItem = new CartItem(); |
308 | 308 | $CartItem |
309 | 309 | ->setClassName('Eccube\Entity\ProductClass') |
310 | - ->setClassId((string)$ProductClass->getId()) |
|
310 | + ->setClassId((string) $ProductClass->getId()) |
|
311 | 311 | ->setPrice($ProductClass->getPrice02IncTax()) |
312 | 312 | ->setQuantity($quantity); |
313 | 313 | |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | */ |
466 | 466 | public function removeProduct($productClassId) |
467 | 467 | { |
468 | - $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string)$productClassId); |
|
468 | + $this->cart->removeCartItemByIdentifier('Eccube\Entity\ProductClass', (string) $productClassId); |
|
469 | 469 | |
470 | 470 | // 支払方法の再設定 |
471 | 471 | if ($this->BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
@@ -65,7 +65,7 @@ |
||
65 | 65 | ->add('name', TextType::class, array( |
66 | 66 | 'required' => false, |
67 | 67 | )) |
68 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($app) { |
|
68 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($app) { |
|
69 | 69 | $form = $event->getForm(); |
70 | 70 | $data = $form->getData(); |
71 | 71 | if (strlen($data['id']) && strlen($data['name']) == 0) { |
@@ -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,201 +135,201 @@ 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 | 181 | |
182 | - $app['eccube.repository.delivery'] = function () use ($app) { |
|
182 | + $app['eccube.repository.delivery'] = function() use ($app) { |
|
183 | 183 | return $app['orm.em']->getRepository('Eccube\Entity\Delivery'); |
184 | 184 | }; |
185 | - $app['eccube.repository.delivery_date'] = function () use ($app) { |
|
185 | + $app['eccube.repository.delivery_date'] = function() use ($app) { |
|
186 | 186 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryDate'); |
187 | 187 | }; |
188 | - $app['eccube.repository.delivery_fee'] = function () use ($app) { |
|
188 | + $app['eccube.repository.delivery_fee'] = function() use ($app) { |
|
189 | 189 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryFee'); |
190 | 190 | }; |
191 | - $app['eccube.repository.delivery_time'] = function () use ($app) { |
|
191 | + $app['eccube.repository.delivery_time'] = function() use ($app) { |
|
192 | 192 | return $app['orm.em']->getRepository('Eccube\Entity\DeliveryTime'); |
193 | 193 | }; |
194 | - $app['eccube.repository.payment'] = function () use ($app) { |
|
194 | + $app['eccube.repository.payment'] = function() use ($app) { |
|
195 | 195 | return $app['orm.em']->getRepository('Eccube\Entity\Payment'); |
196 | 196 | }; |
197 | - $app['eccube.repository.payment_option'] = function () use ($app) { |
|
197 | + $app['eccube.repository.payment_option'] = function() use ($app) { |
|
198 | 198 | return $app['orm.em']->getRepository('Eccube\Entity\PaymentOption'); |
199 | 199 | }; |
200 | - $app['eccube.repository.category'] = function () use ($app) { |
|
200 | + $app['eccube.repository.category'] = function() use ($app) { |
|
201 | 201 | $CategoryRepository = $app['orm.em']->getRepository('Eccube\Entity\Category'); |
202 | 202 | $CategoryRepository->setApplication($app); |
203 | 203 | |
204 | 204 | return $CategoryRepository; |
205 | 205 | }; |
206 | - $app['eccube.repository.customer'] = function () use ($app) { |
|
206 | + $app['eccube.repository.customer'] = function() use ($app) { |
|
207 | 207 | return $app['orm.em']->getRepository('Eccube\Entity\Customer'); |
208 | 208 | }; |
209 | - $app['eccube.repository.news'] = function () use ($app) { |
|
209 | + $app['eccube.repository.news'] = function() use ($app) { |
|
210 | 210 | return $app['orm.em']->getRepository('Eccube\Entity\News'); |
211 | 211 | }; |
212 | - $app['eccube.repository.mail_history'] = function () use ($app) { |
|
212 | + $app['eccube.repository.mail_history'] = function() use ($app) { |
|
213 | 213 | return $app['orm.em']->getRepository('Eccube\Entity\MailHistory'); |
214 | 214 | }; |
215 | - $app['eccube.repository.member'] = function () use ($app) { |
|
215 | + $app['eccube.repository.member'] = function() use ($app) { |
|
216 | 216 | $memberRepository = $app['orm.em']->getRepository('Eccube\Entity\Member'); |
217 | 217 | $memberRepository->setEncoderFactorty($app['security.encoder_factory']); |
218 | 218 | return $memberRepository; |
219 | 219 | }; |
220 | - $app['eccube.repository.order'] = function () use ($app) { |
|
220 | + $app['eccube.repository.order'] = function() use ($app) { |
|
221 | 221 | return $app['orm.em']->getRepository('Eccube\Entity\Order'); |
222 | 222 | }; |
223 | - $app['eccube.repository.product'] = function () use ($app) { |
|
223 | + $app['eccube.repository.product'] = function() use ($app) { |
|
224 | 224 | $productRepository = $app['orm.em']->getRepository('Eccube\Entity\Product'); |
225 | 225 | $productRepository->setApplication($app); |
226 | 226 | |
227 | 227 | return $productRepository; |
228 | 228 | }; |
229 | - $app['eccube.repository.product_image'] = function () use ($app) { |
|
229 | + $app['eccube.repository.product_image'] = function() use ($app) { |
|
230 | 230 | return $app['orm.em']->getRepository('Eccube\Entity\ProductImage'); |
231 | 231 | }; |
232 | - $app['eccube.repository.product_class'] = function () use ($app) { |
|
232 | + $app['eccube.repository.product_class'] = function() use ($app) { |
|
233 | 233 | return $app['orm.em']->getRepository('Eccube\Entity\ProductClass'); |
234 | 234 | }; |
235 | - $app['eccube.repository.product_stock'] = function () use ($app) { |
|
235 | + $app['eccube.repository.product_stock'] = function() use ($app) { |
|
236 | 236 | return $app['orm.em']->getRepository('Eccube\Entity\ProductStock'); |
237 | 237 | }; |
238 | - $app['eccube.repository.product_tag'] = function () use ($app) { |
|
238 | + $app['eccube.repository.product_tag'] = function() use ($app) { |
|
239 | 239 | return $app['orm.em']->getRepository('Eccube\Entity\ProductTag'); |
240 | 240 | }; |
241 | - $app['eccube.repository.class_name'] = function () use ($app) { |
|
241 | + $app['eccube.repository.class_name'] = function() use ($app) { |
|
242 | 242 | return $app['orm.em']->getRepository('Eccube\Entity\ClassName'); |
243 | 243 | }; |
244 | - $app['eccube.repository.class_category'] = function () use ($app) { |
|
244 | + $app['eccube.repository.class_category'] = function() use ($app) { |
|
245 | 245 | return $app['orm.em']->getRepository('Eccube\Entity\ClassCategory'); |
246 | 246 | }; |
247 | - $app['eccube.repository.customer_favorite_product'] = function () use ($app) { |
|
247 | + $app['eccube.repository.customer_favorite_product'] = function() use ($app) { |
|
248 | 248 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerFavoriteProduct'); |
249 | 249 | }; |
250 | - $app['eccube.repository.base_info'] = function () use ($app) { |
|
250 | + $app['eccube.repository.base_info'] = function() use ($app) { |
|
251 | 251 | $BaseInfoRepository = $app['orm.em']->getRepository('Eccube\Entity\BaseInfo'); |
252 | 252 | $BaseInfoRepository->setApplication($app); |
253 | 253 | |
254 | 254 | return $BaseInfoRepository; |
255 | 255 | }; |
256 | - $app['eccube.repository.tax_rule'] = function () use ($app) { |
|
256 | + $app['eccube.repository.tax_rule'] = function() use ($app) { |
|
257 | 257 | $taxRuleRepository = $app['orm.em']->getRepository('Eccube\Entity\TaxRule'); |
258 | 258 | $taxRuleRepository->setApplication($app); |
259 | 259 | |
260 | 260 | return $taxRuleRepository; |
261 | 261 | }; |
262 | - $app['eccube.repository.page_layout'] = function () use ($app) { |
|
262 | + $app['eccube.repository.page_layout'] = function() use ($app) { |
|
263 | 263 | $pageLayoutRepository = $app['orm.em']->getRepository('Eccube\Entity\PageLayout'); |
264 | 264 | $pageLayoutRepository->setApplication($app); |
265 | 265 | |
266 | 266 | return $pageLayoutRepository; |
267 | 267 | }; |
268 | - $app['eccube.repository.block'] = function () use ($app) { |
|
268 | + $app['eccube.repository.block'] = function() use ($app) { |
|
269 | 269 | $blockRepository = $app['orm.em']->getRepository('Eccube\Entity\Block'); |
270 | 270 | $blockRepository->setApplication($app); |
271 | 271 | |
272 | 272 | return $blockRepository; |
273 | 273 | }; |
274 | - $app['eccube.repository.order'] = function () use ($app) { |
|
274 | + $app['eccube.repository.order'] = function() use ($app) { |
|
275 | 275 | $orderRepository = $app['orm.em']->getRepository('Eccube\Entity\Order'); |
276 | 276 | $orderRepository->setApplication($app); |
277 | 277 | |
278 | 278 | return $orderRepository; |
279 | 279 | }; |
280 | - $app['eccube.repository.customer_address'] = function () use ($app) { |
|
280 | + $app['eccube.repository.customer_address'] = function() use ($app) { |
|
281 | 281 | return $app['orm.em']->getRepository('Eccube\Entity\CustomerAddress'); |
282 | 282 | }; |
283 | - $app['eccube.repository.shipping'] = function () use ($app) { |
|
283 | + $app['eccube.repository.shipping'] = function() use ($app) { |
|
284 | 284 | return $app['orm.em']->getRepository('Eccube\Entity\Shipping'); |
285 | 285 | }; |
286 | - $app['eccube.repository.customer_status'] = function () use ($app) { |
|
286 | + $app['eccube.repository.customer_status'] = function() use ($app) { |
|
287 | 287 | return $app['orm.em']->getRepository('Eccube\Entity\Master\CustomerStatus'); |
288 | 288 | }; |
289 | - $app['eccube.repository.order_status'] = function () use ($app) { |
|
289 | + $app['eccube.repository.order_status'] = function() use ($app) { |
|
290 | 290 | return $app['orm.em']->getRepository('Eccube\Entity\Master\OrderStatus'); |
291 | 291 | }; |
292 | - $app['eccube.repository.mail_template'] = function () use ($app) { |
|
292 | + $app['eccube.repository.mail_template'] = function() use ($app) { |
|
293 | 293 | return $app['orm.em']->getRepository('Eccube\Entity\MailTemplate'); |
294 | 294 | }; |
295 | - $app['eccube.repository.csv'] = function () use ($app) { |
|
295 | + $app['eccube.repository.csv'] = function() use ($app) { |
|
296 | 296 | return $app['orm.em']->getRepository('Eccube\Entity\Csv'); |
297 | 297 | }; |
298 | - $app['eccube.repository.template'] = function () use ($app) { |
|
298 | + $app['eccube.repository.template'] = function() use ($app) { |
|
299 | 299 | return $app['orm.em']->getRepository('Eccube\Entity\Template'); |
300 | 300 | }; |
301 | - $app['eccube.repository.authority_role'] = function () use ($app) { |
|
301 | + $app['eccube.repository.authority_role'] = function() use ($app) { |
|
302 | 302 | return $app['orm.em']->getRepository('Eccube\Entity\AuthorityRole'); |
303 | 303 | }; |
304 | 304 | |
305 | - $app['paginator'] = $app->protect(function () { |
|
305 | + $app['paginator'] = $app->protect(function() { |
|
306 | 306 | $paginator = new \Knp\Component\Pager\Paginator(); |
307 | 307 | $paginator->subscribe(new \Eccube\EventListener\PaginatorListener()); |
308 | 308 | |
309 | 309 | return $paginator; |
310 | 310 | }); |
311 | 311 | |
312 | - $app['eccube.repository.help'] = function () use ($app) { |
|
312 | + $app['eccube.repository.help'] = function() use ($app) { |
|
313 | 313 | return $app['orm.em']->getRepository('Eccube\Entity\Help'); |
314 | 314 | }; |
315 | - $app['eccube.repository.plugin'] = function () use ($app) { |
|
315 | + $app['eccube.repository.plugin'] = function() use ($app) { |
|
316 | 316 | return $app['orm.em']->getRepository('Eccube\Entity\Plugin'); |
317 | 317 | }; |
318 | - $app['eccube.repository.plugin_event_handler'] = function () use ($app) { |
|
318 | + $app['eccube.repository.plugin_event_handler'] = function() use ($app) { |
|
319 | 319 | return $app['orm.em']->getRepository('Eccube\Entity\PluginEventHandler'); |
320 | 320 | }; |
321 | 321 | |
322 | - $app['request_scope'] = function () { |
|
322 | + $app['request_scope'] = function() { |
|
323 | 323 | return new ParameterBag(); |
324 | 324 | }; |
325 | 325 | |
326 | 326 | // Form\Type |
327 | - $app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
327 | + $app->extend('form.type.extensions', function($extensions) use ($app) { |
|
328 | 328 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
329 | 329 | $extensions[] = new \Eccube\Form\Extension\FreezeTypeExtension(); |
330 | 330 | return $extensions; |
331 | 331 | }); |
332 | - $app->extend('form.types', function ($types) use ($app) { |
|
332 | + $app->extend('form.types', function($types) use ($app) { |
|
333 | 333 | $types[] = new \Eccube\Form\Type\NameType($app['config']); |
334 | 334 | $types[] = new \Eccube\Form\Type\KanaType($app['config']); |
335 | 335 | $types[] = new \Eccube\Form\Type\TelType($app['config']); |
@@ -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']; |
@@ -178,14 +178,14 @@ discard block |
||
178 | 178 | $sessionData['admin_force_ssl'] = (bool) $config['force_ssl']; |
179 | 179 | |
180 | 180 | // ロードバランサー、プロキシサーバ設定 |
181 | - $sessionData['trusted_proxies_connection_only'] = (bool)$config['trusted_proxies_connection_only']; |
|
181 | + $sessionData['trusted_proxies_connection_only'] = (bool) $config['trusted_proxies_connection_only']; |
|
182 | 182 | $trustedProxies = $config['trusted_proxies']; |
183 | 183 | if (count($trustedProxies) > 0) { |
184 | 184 | $sessionData['trusted_proxies'] = Str::convertLineFeed(implode("\n", $trustedProxies)); |
185 | 185 | } |
186 | 186 | |
187 | 187 | // メール設定 |
188 | - $config_file = $this->config_path . '/mail.yml'; |
|
188 | + $config_file = $this->config_path.'/mail.yml'; |
|
189 | 189 | $config = Yaml::parse(file_get_contents($config_file)); |
190 | 190 | $mail = $config['mail']; |
191 | 191 | $sessionData['mail_backend'] = $mail['transport']; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | |
209 | 209 | return $app['twig']->render('step3.twig', array( |
210 | 210 | 'form' => $form->createView(), |
211 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
211 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
212 | 212 | )); |
213 | 213 | } |
214 | 214 | |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | |
224 | 224 | if (empty($sessionData['database'])) { |
225 | 225 | |
226 | - $config_file = $this->config_path . '/database.yml'; |
|
226 | + $config_file = $this->config_path.'/database.yml'; |
|
227 | 227 | $fs = new Filesystem(); |
228 | 228 | |
229 | 229 | if ($fs->exists($config_file)) { |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | |
252 | 252 | return $app['twig']->render('step4.twig', array( |
253 | 253 | 'form' => $form->createView(), |
254 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
254 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
255 | 255 | )); |
256 | 256 | } |
257 | 257 | |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | $host = $request->getSchemeAndHttpHost(); |
298 | 298 | $basePath = $request->getBasePath(); |
299 | 299 | $params = array( |
300 | - 'http_url' => $host . $basePath, |
|
300 | + 'http_url' => $host.$basePath, |
|
301 | 301 | 'shop_name' => $sessionData['shop_name'], |
302 | 302 | ); |
303 | 303 | |
@@ -312,16 +312,16 @@ discard block |
||
312 | 312 | |
313 | 313 | return $app['twig']->render('step5.twig', array( |
314 | 314 | 'form' => $form->createView(), |
315 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
315 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
316 | 316 | )); |
317 | 317 | } |
318 | 318 | |
319 | 319 | // インストール完了 |
320 | 320 | public function complete(InstallApplication $app, Request $request) |
321 | 321 | { |
322 | - $config_yml = $this->config_path . '/config.yml'; |
|
322 | + $config_yml = $this->config_path.'/config.yml'; |
|
323 | 323 | $config = Yaml::parse(file_get_contents($config_yml)); |
324 | - $config_path = $this->config_path . '/path.yml'; |
|
324 | + $config_path = $this->config_path.'/path.yml'; |
|
325 | 325 | $path_yml = Yaml::parse(file_get_contents($config_path)); |
326 | 326 | |
327 | 327 | $config = array_replace_recursive($path_yml, $config); |
@@ -336,11 +336,11 @@ discard block |
||
336 | 336 | $host = $request->getSchemeAndHttpHost(); |
337 | 337 | $basePath = $request->getBasePath(); |
338 | 338 | |
339 | - $adminUrl = $host . $basePath . '/' . $config['admin_dir']; |
|
339 | + $adminUrl = $host.$basePath.'/'.$config['admin_dir']; |
|
340 | 340 | |
341 | 341 | return $app['twig']->render('complete.twig', array( |
342 | 342 | 'admin_url' => $adminUrl, |
343 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
343 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
344 | 344 | )); |
345 | 345 | } |
346 | 346 | |
@@ -356,12 +356,12 @@ discard block |
||
356 | 356 | { |
357 | 357 | foreach ($this->required_modules as $module) { |
358 | 358 | if (!extension_loaded($module)) { |
359 | - $app->addDanger('[必須] ' . $module . ' 拡張モジュールが有効になっていません。', 'install'); |
|
359 | + $app->addDanger('[必須] '.$module.' 拡張モジュールが有効になっていません。', 'install'); |
|
360 | 360 | } |
361 | 361 | } |
362 | 362 | |
363 | 363 | if (!extension_loaded('pdo_mysql') && !extension_loaded('pdo_pgsql')) { |
364 | - $app->addDanger('[必須] ' . 'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
364 | + $app->addDanger('[必須] '.'pdo_pgsql又はpdo_mysql 拡張モジュールを有効にしてください。', 'install'); |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | foreach ($this->recommended_module as $module) { |
@@ -389,7 +389,7 @@ discard block |
||
389 | 389 | if (!function_exists('apache_get_modules')) { |
390 | 390 | $app->addWarning('mod_rewrite が有効になっているか不明です。', 'install'); |
391 | 391 | } elseif (!in_array('mod_rewrite', apache_get_modules())) { |
392 | - $app->addDanger('[必須] ' . 'mod_rewriteを有効にしてください。', 'install'); |
|
392 | + $app->addDanger('[必須] '.'mod_rewriteを有効にしてください。', 'install'); |
|
393 | 393 | } |
394 | 394 | } elseif (isset($_SERVER['SERVER_SOFTWARE']) && strpos('Microsoft-IIS', $_SERVER['SERVER_SOFTWARE']) !== false) { |
395 | 395 | // iis |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | |
401 | 401 | private function setPDO() |
402 | 402 | { |
403 | - $config_file = $this->config_path . '/database.yml'; |
|
403 | + $config_file = $this->config_path.'/database.yml'; |
|
404 | 404 | $config = Yaml::parse(file_get_contents($config_file)); |
405 | 405 | |
406 | 406 | try { |
@@ -435,7 +435,7 @@ discard block |
||
435 | 435 | private function getEntityManager() |
436 | 436 | { |
437 | 437 | if (!isset($this->app['orm.em'])) { |
438 | - $config_file = $this->config_path . '/database.yml'; |
|
438 | + $config_file = $this->config_path.'/database.yml'; |
|
439 | 439 | $database = Yaml::parse(file_get_contents($config_file)); |
440 | 440 | |
441 | 441 | $this->app->register(new \Silex\Provider\DoctrineServiceProvider(), array( |
@@ -447,8 +447,8 @@ discard block |
||
447 | 447 | 'type' => 'yml', |
448 | 448 | 'namespace' => 'Eccube\Entity', |
449 | 449 | 'path' => array( |
450 | - __DIR__ . '/../../Resource/doctrine', |
|
451 | - __DIR__ . '/../../Resource/doctrine/master', |
|
450 | + __DIR__.'/../../Resource/doctrine', |
|
451 | + __DIR__.'/../../Resource/doctrine/master', |
|
452 | 452 | ), |
453 | 453 | ), |
454 | 454 | array( // TODO 暫定 |
@@ -480,7 +480,7 @@ discard block |
||
480 | 480 | } |
481 | 481 | } |
482 | 482 | $this->app->register(new \Dflydev\Provider\DoctrineOrm\DoctrineOrmServiceProvider(), array( |
483 | - 'orm.proxies_dir' => __DIR__ . '/../../app/cache/doctrine', |
|
483 | + 'orm.proxies_dir' => __DIR__.'/../../app/cache/doctrine', |
|
484 | 484 | 'orm.em.options' => array( |
485 | 485 | 'mappings' => $ormMappings |
486 | 486 | ) |
@@ -508,11 +508,11 @@ discard block |
||
508 | 508 | { |
509 | 509 | $this->resetNatTimer(); |
510 | 510 | |
511 | - $config_file = $this->config_path . '/database.yml'; |
|
511 | + $config_file = $this->config_path.'/database.yml'; |
|
512 | 512 | $database = Yaml::parse(file_get_contents($config_file)); |
513 | 513 | $config['database'] = $database['database']; |
514 | 514 | |
515 | - $config_file = $this->config_path . '/config.yml'; |
|
515 | + $config_file = $this->config_path.'/config.yml'; |
|
516 | 516 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
517 | 517 | $config['config'] = $baseConfig; |
518 | 518 | |
@@ -570,11 +570,11 @@ discard block |
||
570 | 570 | { |
571 | 571 | $this->resetNatTimer(); |
572 | 572 | |
573 | - $config_file = $this->config_path . '/database.yml'; |
|
573 | + $config_file = $this->config_path.'/database.yml'; |
|
574 | 574 | $database = Yaml::parse(file_get_contents($config_file)); |
575 | 575 | $config['database'] = $database['database']; |
576 | 576 | |
577 | - $config_file = $this->config_path . '/config.yml'; |
|
577 | + $config_file = $this->config_path.'/config.yml'; |
|
578 | 578 | $baseConfig = Yaml::parse(file_get_contents($config_file)); |
579 | 579 | $config['config'] = $baseConfig; |
580 | 580 | |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | $config = new Configuration($app['db']); |
638 | 638 | $config->setMigrationsNamespace('DoctrineMigrations'); |
639 | 639 | |
640 | - $migrationDir = __DIR__ . '/../../Resource/doctrine/migration'; |
|
640 | + $migrationDir = __DIR__.'/../../Resource/doctrine/migration'; |
|
641 | 641 | $config->setMigrationsDirectory($migrationDir); |
642 | 642 | $config->registerMigrationsFromDirectory($migrationDir); |
643 | 643 | |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | private function getProtectedDirs() |
670 | 670 | { |
671 | 671 | $protectedDirs = array(); |
672 | - $base = __DIR__ . '/../../../..'; |
|
672 | + $base = __DIR__.'/../../../..'; |
|
673 | 673 | $dirs = array( |
674 | 674 | '/html', |
675 | 675 | '/app', |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | ); |
683 | 683 | |
684 | 684 | foreach ($dirs as $dir) { |
685 | - if (!is_writable($base . $dir)) { |
|
685 | + if (!is_writable($base.$dir)) { |
|
686 | 686 | $protectedDirs[] = $dir; |
687 | 687 | } |
688 | 688 | } |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | private function createConfigYamlFile($data, $auth = true) |
694 | 694 | { |
695 | 695 | $fs = new Filesystem(); |
696 | - $config_file = $this->config_path . '/config.yml'; |
|
696 | + $config_file = $this->config_path.'/config.yml'; |
|
697 | 697 | |
698 | 698 | if ($fs->exists($config_file)) { |
699 | 699 | $config = Yaml::parse(file_get_contents($config_file)); |
@@ -734,7 +734,7 @@ discard block |
||
734 | 734 | |
735 | 735 | $fs = new Filesystem(); |
736 | 736 | $content = str_replace( |
737 | - $target, $replace, file_get_contents($this->dist_path . '/config.yml.dist') |
|
737 | + $target, $replace, file_get_contents($this->dist_path.'/config.yml.dist') |
|
738 | 738 | ); |
739 | 739 | $fs->dumpFile($config_file, $content); |
740 | 740 | |
@@ -750,7 +750,7 @@ discard block |
||
750 | 750 | |
751 | 751 | private function addInstallStatus() |
752 | 752 | { |
753 | - $config_file = $this->config_path . '/config.yml'; |
|
753 | + $config_file = $this->config_path.'/config.yml'; |
|
754 | 754 | $config = Yaml::parse(file_get_contents($config_file)); |
755 | 755 | $config['eccube_install'] = 1; |
756 | 756 | $yml = Yaml::dump($config); |
@@ -762,7 +762,7 @@ discard block |
||
762 | 762 | private function createDatabaseYamlFile($data) |
763 | 763 | { |
764 | 764 | $fs = new Filesystem(); |
765 | - $config_file = $this->config_path . '/database.yml'; |
|
765 | + $config_file = $this->config_path.'/database.yml'; |
|
766 | 766 | if ($fs->exists($config_file)) { |
767 | 767 | $fs->remove($config_file); |
768 | 768 | } |
@@ -795,14 +795,14 @@ discard block |
||
795 | 795 | |
796 | 796 | $fs = new Filesystem(); |
797 | 797 | $content = str_replace( |
798 | - $target, $replace, file_get_contents($this->dist_path . '/database.yml.dist') |
|
798 | + $target, $replace, file_get_contents($this->dist_path.'/database.yml.dist') |
|
799 | 799 | ); |
800 | 800 | } else { |
801 | 801 | $content = Yaml::dump( |
802 | 802 | array( |
803 | 803 | 'database' => array( |
804 | 804 | 'driver' => 'pdo_sqlite', |
805 | - 'path' => realpath($this->config_path . '/eccube.db') |
|
805 | + 'path' => realpath($this->config_path.'/eccube.db') |
|
806 | 806 | ) |
807 | 807 | ) |
808 | 808 | ); |
@@ -815,7 +815,7 @@ discard block |
||
815 | 815 | private function createMailYamlFile($data) |
816 | 816 | { |
817 | 817 | $fs = new Filesystem(); |
818 | - $config_file = $this->config_path . '/mail.yml'; |
|
818 | + $config_file = $this->config_path.'/mail.yml'; |
|
819 | 819 | if ($fs->exists($config_file)) { |
820 | 820 | $fs->remove($config_file); |
821 | 821 | } |
@@ -830,7 +830,7 @@ discard block |
||
830 | 830 | |
831 | 831 | $fs = new Filesystem(); |
832 | 832 | $content = str_replace( |
833 | - $target, $replace, file_get_contents($this->dist_path . '/mail.yml.dist') |
|
833 | + $target, $replace, file_get_contents($this->dist_path.'/mail.yml.dist') |
|
834 | 834 | ); |
835 | 835 | $fs->dumpFile($config_file, $content); |
836 | 836 | |
@@ -840,7 +840,7 @@ discard block |
||
840 | 840 | private function createPathYamlFile($data, Request $request) |
841 | 841 | { |
842 | 842 | $fs = new Filesystem(); |
843 | - $config_file = $this->config_path . '/path.yml'; |
|
843 | + $config_file = $this->config_path.'/path.yml'; |
|
844 | 844 | if ($fs->exists($config_file)) { |
845 | 845 | $fs->remove($config_file); |
846 | 846 | } |
@@ -848,16 +848,16 @@ discard block |
||
848 | 848 | $ADMIN_ROUTE = $data['admin_dir']; |
849 | 849 | $TEMPLATE_CODE = 'default'; |
850 | 850 | $USER_DATA_ROUTE = 'user_data'; |
851 | - $ROOT_DIR = realpath(__DIR__ . '/../../../../'); |
|
851 | + $ROOT_DIR = realpath(__DIR__.'/../../../../'); |
|
852 | 852 | $ROOT_URLPATH = $request->getBasePath(); |
853 | - $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH . RELATIVE_PUBLIC_DIR_PATH; |
|
853 | + $ROOT_PUBLIC_URLPATH = $ROOT_URLPATH.RELATIVE_PUBLIC_DIR_PATH; |
|
854 | 854 | |
855 | 855 | $target = array('${ADMIN_ROUTE}', '${TEMPLATE_CODE}', '${USER_DATA_ROUTE}', '${ROOT_DIR}', '${ROOT_URLPATH}', '${ROOT_PUBLIC_URLPATH}'); |
856 | 856 | $replace = array($ADMIN_ROUTE, $TEMPLATE_CODE, $USER_DATA_ROUTE, $ROOT_DIR, $ROOT_URLPATH, $ROOT_PUBLIC_URLPATH); |
857 | 857 | |
858 | 858 | $fs = new Filesystem(); |
859 | 859 | $content = str_replace( |
860 | - $target, $replace, file_get_contents($this->dist_path . '/path.yml.dist') |
|
860 | + $target, $replace, file_get_contents($this->dist_path.'/path.yml.dist') |
|
861 | 861 | ); |
862 | 862 | $fs->dumpFile($config_file, $content); |
863 | 863 | |
@@ -866,7 +866,7 @@ discard block |
||
866 | 866 | |
867 | 867 | private function sendAppData($params) |
868 | 868 | { |
869 | - $config_file = $this->config_path . '/database.yml'; |
|
869 | + $config_file = $this->config_path.'/database.yml'; |
|
870 | 870 | $db_config = Yaml::parse(file_get_contents($config_file)); |
871 | 871 | |
872 | 872 | $this->setPDO(); |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | } |
879 | 879 | |
880 | 880 | if ($db_config['database']['driver'] === 'pdo_mysql') { |
881 | - $db_ver = 'MySQL:' . $version; |
|
881 | + $db_ver = 'MySQL:'.$version; |
|
882 | 882 | } else { |
883 | 883 | $db_ver = $version; |
884 | 884 | } |
@@ -896,7 +896,7 @@ discard block |
||
896 | 896 | |
897 | 897 | $header = array( |
898 | 898 | 'Content-Type: application/x-www-form-urlencoded', |
899 | - 'Content-Length: ' . strlen($data), |
|
899 | + 'Content-Length: '.strlen($data), |
|
900 | 900 | ); |
901 | 901 | $context = stream_context_create( |
902 | 902 | array( |
@@ -923,7 +923,7 @@ discard block |
||
923 | 923 | public function migration(InstallApplication $app, Request $request) |
924 | 924 | { |
925 | 925 | return $app['twig']->render('migration.twig', array( |
926 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
926 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
927 | 927 | )); |
928 | 928 | } |
929 | 929 | |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | return $app['twig']->render('migration_plugin.twig', array( |
953 | 953 | 'Plugins' => $Plugins, |
954 | 954 | 'version' => Constant::VERSION, |
955 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
955 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
956 | 956 | )); |
957 | 957 | } |
958 | 958 | } |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | \Eccube\Util\Cache::clear($config_app, true); |
976 | 976 | |
977 | 977 | return $app['twig']->render('migration_end.twig', array( |
978 | - 'publicPath' => '..' . RELATIVE_PUBLIC_DIR_PATH . '/', |
|
978 | + 'publicPath' => '..'.RELATIVE_PUBLIC_DIR_PATH.'/', |
|
979 | 979 | )); |
980 | 980 | } |
981 | 981 | } |