@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | 'allow_delete' => true, |
208 | 208 | 'prototype' => true, |
209 | 209 | )) |
210 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
210 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
211 | 211 | /** @var \Eccube\Entity\Shipping $data */ |
212 | 212 | $data = $event->getData(); |
213 | 213 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | 'placeholder' => '指定なし', |
229 | 229 | 'required' => false, |
230 | 230 | 'data' => $DeliveryTime, |
231 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
231 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
232 | 232 | $qb = $er->createQueryBuilder('dt'); |
233 | 233 | if ($Delivery) { |
234 | 234 | $qb |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | 'mapped' => false, |
241 | 241 | )); |
242 | 242 | }) |
243 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
243 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
244 | 244 | $data = $event->getData(); |
245 | 245 | $form = $event->getForm(); |
246 | 246 | |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | 'choice_label' => 'delivery_time', |
262 | 262 | 'placeholder' => '指定なし', |
263 | 263 | 'required' => false, |
264 | - 'query_builder' => function (EntityRepository $er) use ($Delivery) { |
|
264 | + 'query_builder' => function(EntityRepository $er) use ($Delivery) { |
|
265 | 265 | $qb = $er->createQueryBuilder('dt'); |
266 | 266 | if ($Delivery) { |
267 | 267 | $qb |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | 'mapped' => false, |
274 | 274 | )); |
275 | 275 | }) |
276 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
276 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
277 | 277 | $form = $event->getForm(); |
278 | 278 | $OrderItems = $form['OrderItems']->getData(); |
279 | 279 | |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $form['shipping_delivery_date']->addError(new FormError('商品が追加されていません。')); |
283 | 283 | } |
284 | 284 | }) |
285 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
285 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
286 | 286 | $form = $event->getForm(); |
287 | 287 | $Shipping = $event->getData(); |
288 | 288 | $Delivery = $Shipping->getDelivery(); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | public function register(Container $app) |
27 | 27 | { |
28 | 28 | // EventDispatcher |
29 | - $app['eccube.event.dispatcher'] = function () use ($app) { |
|
29 | + $app['eccube.event.dispatcher'] = function() use ($app) { |
|
30 | 30 | return $app['dispatcher']; |
31 | 31 | }; |
32 | 32 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | $enabledPlugins = $app['orm.em']->getRepository('Eccube\Entity\Plugin')->findAllEnabled(); |
37 | 37 | |
38 | - $app['eccube.routers.plugin'] = function ($app) use ($enabledPlugins) { |
|
38 | + $app['eccube.routers.plugin'] = function($app) use ($enabledPlugins) { |
|
39 | 39 | $pluginDirs = array_map(function($plugin) use ($app) { |
40 | 40 | return $app['config']['root_dir'].'/app/Plugin/'.$plugin->getCode(); |
41 | 41 | }, $enabledPlugins); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $config = $pluginConfig['config']; |
63 | 63 | |
64 | 64 | if (isset($config['const'])) { |
65 | - $app->extend('config', function ($eccubeConfig) use ($config) { |
|
65 | + $app->extend('config', function($eccubeConfig) use ($config) { |
|
66 | 66 | $eccubeConfig[$config['code']] = array( |
67 | 67 | 'const' => $config['const'], |
68 | 68 | ); |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | public function initPluginEventDispatcher(Application $app) |
85 | 85 | { |
86 | 86 | // hook point |
87 | - $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
87 | + $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
88 | 88 | if (!$event->isMasterRequest()) { |
89 | 89 | return; |
90 | 90 | } |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
93 | 93 | }, Application::EARLY_EVENT); |
94 | 94 | |
95 | - $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
95 | + $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
96 | 96 | if (!$event->isMasterRequest()) { |
97 | 97 | return; |
98 | 98 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
102 | 102 | }); |
103 | 103 | |
104 | - $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
104 | + $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
105 | 105 | if (!$event->isMasterRequest()) { |
106 | 106 | return; |
107 | 107 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
111 | 111 | }); |
112 | 112 | |
113 | - $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
113 | + $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
114 | 114 | if (!$event->isMasterRequest()) { |
115 | 115 | return; |
116 | 116 | } |
@@ -118,13 +118,13 @@ discard block |
||
118 | 118 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
119 | 119 | }, Application::LATE_EVENT); |
120 | 120 | |
121 | - $app->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) { |
|
121 | + $app->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) { |
|
122 | 122 | $route = $event->getRequest()->attributes->get('_route'); |
123 | 123 | $hookpoint = "eccube.event.controller.$route.finish"; |
124 | 124 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
125 | 125 | }); |
126 | 126 | |
127 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
127 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
128 | 128 | if (!$event->isMasterRequest()) { |
129 | 129 | return; |
130 | 130 | } |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | }); |
134 | 134 | |
135 | 135 | // Request Event |
136 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
136 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
137 | 137 | |
138 | 138 | if (!$event->isMasterRequest()) { |
139 | 139 | return; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | }, 30); // Routing(32)が解決し, 認証判定(8)が実行される前のタイミング. |
165 | 165 | |
166 | 166 | // Controller Event |
167 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
167 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
168 | 168 | |
169 | 169 | if (!$event->isMasterRequest()) { |
170 | 170 | return; |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | }); |
194 | 194 | |
195 | 195 | // Response Event |
196 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
196 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
197 | 197 | if (!$event->isMasterRequest()) { |
198 | 198 | return; |
199 | 199 | } |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | }); |
223 | 223 | |
224 | 224 | // Exception Event |
225 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
225 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
226 | 226 | |
227 | 227 | if (!$event->isMasterRequest()) { |
228 | 228 | return; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | }); |
253 | 253 | |
254 | 254 | // Terminate Event |
255 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
255 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
256 | 256 | |
257 | 257 | $route = $event->getRequest()->attributes->get('_route'); |
258 | 258 |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | public function updateSchema($generatedFiles, $proxiesDirectory) |
46 | 46 | { |
47 | - $outputDir = sys_get_temp_dir() . '/proxy_' . Str::random(12); |
|
47 | + $outputDir = sys_get_temp_dir().'/proxy_'.Str::random(12); |
|
48 | 48 | mkdir($outputDir); |
49 | 49 | |
50 | 50 | try { |
@@ -12,7 +12,7 @@ |
||
12 | 12 | { |
13 | 13 | public function register(Container $app) |
14 | 14 | { |
15 | - $app['eccube.di'] = function (Container $app) { |
|
15 | + $app['eccube.di'] = function(Container $app) { |
|
16 | 16 | $di = new DependencyBuilder( |
17 | 17 | $app['eccube.di.generator.dir'], |
18 | 18 | $app['eccube.di.generator.class'], |
@@ -1,8 +1,8 @@ |
||
1 | 1 | <?php return [ |
2 | 2 | 'root_dir' => '%ROOT_DIR%', |
3 | 3 | 'root_urlpath' => env('ECCUBE_ROOT_URLPATH', null), |
4 | - 'template_code' => env('ECCUBE_TEMPLATE_CODE','default'), |
|
5 | - 'admin_route' => env('ECCUBE_ADMIN_ROUTE','admin'), |
|
4 | + 'template_code' => env('ECCUBE_TEMPLATE_CODE', 'default'), |
|
5 | + 'admin_route' => env('ECCUBE_ADMIN_ROUTE', 'admin'), |
|
6 | 6 | 'user_data_route' => env('ECCUBE_USER_DATA_ROUTE', 'user_data'), |
7 | 7 | 'public_path' => env('ECCUBE_ROOT_URLPATH', null).'/html', |
8 | 8 | 'public_path_realdir' => '%ROOT_DIR%/html', |
@@ -34,7 +34,7 @@ |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | // CSV Reader に設定 |
37 | - $this->file->setFlags(\SplFileObject::READ_CSV | \SplFileObject::READ_AHEAD | \SplFileObject::SKIP_EMPTY |\SplFileObject::DROP_NEW_LINE); |
|
37 | + $this->file->setFlags(\SplFileObject::READ_CSV|\SplFileObject::READ_AHEAD|\SplFileObject::SKIP_EMPTY|\SplFileObject::DROP_NEW_LINE); |
|
38 | 38 | |
39 | 39 | // ヘッダ行を取得 |
40 | 40 | $headers = $this->file->current(); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | { |
144 | 144 | // Proxyのクラスをロードせずにスキーマを更新するために、 |
145 | 145 | // インストール時には一時的なディレクトリにProxyを生成する |
146 | - $tmpProxyOutputDir = sys_get_temp_dir() . '/proxy_' . Str::random(12); |
|
146 | + $tmpProxyOutputDir = sys_get_temp_dir().'/proxy_'.Str::random(12); |
|
147 | 147 | @mkdir($tmpProxyOutputDir); |
148 | 148 | |
149 | 149 | try { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | if (!empty($config_cache)) { |
210 | 210 | $meta = $config_cache; |
211 | 211 | } else { |
212 | - $meta = $this->readYml($dir . '/config.yml'); |
|
212 | + $meta = $this->readYml($dir.'/config.yml'); |
|
213 | 213 | } |
214 | 214 | } catch (\Symfony\Component\Yaml\Exception\ParseException $e) { |
215 | 215 | throw new PluginException($e->getMessage(), $e->getCode(), $e); |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | $this->register(new MobileDetectServiceProvider()); |
207 | 207 | $this->register(new TwigLintServiceProvider()); |
208 | 208 | |
209 | - $this->error(function (\Exception $e, Request $request, $code) { |
|
209 | + $this->error(function(\Exception $e, Request $request, $code) { |
|
210 | 210 | if ($this['debug']) { |
211 | 211 | return; |
212 | 212 | } |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | |
274 | 274 | $pluginSubDirs = (function($dirName) use ($enabledPluginDirs) { |
275 | 275 | return array_map(function($pluginDir) use ($dirName) { |
276 | - return $pluginDir . '/' . $dirName; |
|
276 | + return $pluginDir.'/'.$dirName; |
|
277 | 277 | }, $enabledPluginDirs); |
278 | 278 | }); |
279 | 279 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | return $router; |
345 | 345 | }); |
346 | 346 | |
347 | - $this['eccube.router.origin'] = function ($app) { |
|
347 | + $this['eccube.router.origin'] = function($app) { |
|
348 | 348 | $resource = __DIR__.'/Controller'; |
349 | 349 | $cachePrefix = 'Origin'; |
350 | 350 | |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | $this['eccube.routers.plugin'] = []; |
355 | 355 | |
356 | 356 | if (isset($this['config']['vendor_dir']) && file_exists($this['config']['vendor_dir'].'/Controller')) { |
357 | - $this['eccube.router.extend'] = function ($app) { |
|
357 | + $this['eccube.router.extend'] = function($app) { |
|
358 | 358 | $resource = $app['config']['vendor_dir'].'/Controller'; |
359 | 359 | $cachePrefix = 'Extend'; |
360 | 360 | |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | return $router; |
364 | 364 | }; |
365 | 365 | } |
366 | - $this->extend('request_matcher', function ($matcher, $app) { |
|
366 | + $this->extend('request_matcher', function($matcher, $app) { |
|
367 | 367 | $matchers = []; |
368 | 368 | if (isset($app['eccube.router.extend'])) { |
369 | 369 | $matchers[] = $app['eccube.router.extend']; |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | return new ChainUrlMatcher($matchers, $app['request_context']); |
378 | 378 | }); |
379 | 379 | |
380 | - $this->extend('url_generator', function ($generator, $app) { |
|
380 | + $this->extend('url_generator', function($generator, $app) { |
|
381 | 381 | $generators = []; |
382 | 382 | if (isset($app['eccube.router.extend'])) { |
383 | 383 | $generators[] = $app['eccube.router.extend']; |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | }); |
393 | 393 | |
394 | 394 | // Route CollectionにEC-CUBEで定義したルーティングを追加(debug tool barに出力するため) |
395 | - $this->extend('routes', function ($routes, $app) { |
|
395 | + $this->extend('routes', function($routes, $app) { |
|
396 | 396 | if (isset($app['eccube.router.extend'])) { |
397 | 397 | $routes->addCollection($app['eccube.router.extend']->getRouteCollection()); |
398 | 398 | } |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | 'translator.cache_dir' => $this['debug'] ? null : $this['config']['root_dir'].'/app/cache/translator', |
428 | 428 | 'locale_fallbacks' => ['ja', 'en'], |
429 | 429 | )); |
430 | - $this->extend('translator', function ($translator, \Silex\Application $app) { |
|
430 | + $this->extend('translator', function($translator, \Silex\Application $app) { |
|
431 | 431 | $translator->addLoader('php', new \Symfony\Component\Translation\Loader\PhpFileLoader()); |
432 | 432 | |
433 | 433 | $file = __DIR__.'/Resource/locale/messages.'.$app['locale'].'.php'; |
@@ -470,14 +470,14 @@ discard block |
||
470 | 470 | $this->register(new \Silex\Provider\TwigServiceProvider(), array( |
471 | 471 | 'twig.form.templates' => array('Form/form_div_layout.twig'), |
472 | 472 | )); |
473 | - $this->extend('twig', function (\Twig_Environment $twig, \Silex\Application $app) { |
|
473 | + $this->extend('twig', function(\Twig_Environment $twig, \Silex\Application $app) { |
|
474 | 474 | $twig->addExtension(new \Eccube\Twig\Extension\EccubeExtension($app)); |
475 | 475 | $twig->addExtension(new \Twig_Extension_StringLoader()); |
476 | 476 | |
477 | 477 | return $twig; |
478 | 478 | }); |
479 | 479 | |
480 | - $this->before(function (Request $request, \Silex\Application $app) { |
|
480 | + $this->before(function(Request $request, \Silex\Application $app) { |
|
481 | 481 | $app['admin'] = $app['front'] = false; |
482 | 482 | $pathinfo = rawurldecode($request->getPathInfo()); |
483 | 483 | if (strpos($pathinfo, '/'.trim($app['config']['admin_route'], '/').'/') === 0) { |
@@ -493,7 +493,7 @@ discard block |
||
493 | 493 | } |
494 | 494 | $paths[] = $app['config']['template_admin_realdir']; |
495 | 495 | $paths[] = __DIR__.'/../../app/Plugin'; |
496 | - $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
496 | + $cacheDir = __DIR__.'/../../app/cache/twig/admin'; |
|
497 | 497 | } else { |
498 | 498 | // モバイル端末時、smartphoneディレクトリを探索パスに追加する. |
499 | 499 | if ($app['mobile_detect.device_type'] == \Eccube\Entity\Master\DeviceType::DEVICE_TYPE_SP) { |
@@ -508,7 +508,7 @@ discard block |
||
508 | 508 | } |
509 | 509 | $paths[] = $app['config']['template_default_realdir']; |
510 | 510 | $paths[] = __DIR__.'/../../app/Plugin'; |
511 | - $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
511 | + $cacheDir = __DIR__.'/../../app/cache/twig/'.$app['config']['template_code']; |
|
512 | 512 | } |
513 | 513 | $app['twig']->setCache($app['debug'] ? null : $cacheDir); |
514 | 514 | $app['twig.loader']->addLoader(new \Twig_Loader_Filesystem($paths)); |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | }, self::EARLY_EVENT); |
527 | 527 | |
528 | 528 | // twigのグローバル変数を定義. |
529 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
529 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) { |
|
530 | 530 | // 未ログイン時にマイページや管理画面以下にアクセスするとSubRequestで実行されるため, |
531 | 531 | // $event->isMasterRequest()ではなく、グローバル変数が初期化済かどうかの判定を行う |
532 | 532 | if (isset($this['twig_global_initialized']) && $this['twig_global_initialized'] === true) { |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | // メール送信時の文字エンコード指定(デフォルトはUTF-8) |
612 | 612 | if (isset($this['config']['mail']['charset_iso_2022_jp']) && is_bool($this['config']['mail']['charset_iso_2022_jp'])) { |
613 | 613 | if ($this['config']['mail']['charset_iso_2022_jp'] === true) { |
614 | - \Swift::init(function () { |
|
614 | + \Swift::init(function() { |
|
615 | 615 | \Swift_DependencyContainer::getInstance() |
616 | 616 | ->register('mime.qpheaderencoder') |
617 | 617 | ->asAliasOf('mime.base64headerencoder'); |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | $this->register(new \Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider()); |
647 | 647 | |
648 | 648 | $app = $this; |
649 | - $this->extend('db.event_manager', function ($evm) use ($app) { |
|
649 | + $this->extend('db.event_manager', function($evm) use ($app) { |
|
650 | 650 | $initSubscriber = new InitSubscriber($app); |
651 | 651 | $evm->addEventSubscriber($initSubscriber); |
652 | 652 | |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | |
764 | 764 | $this->extend( |
765 | 765 | 'orm.em.config', |
766 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
766 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
767 | 767 | |
768 | 768 | /** @var $chain \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain */ |
769 | 769 | $chain = $config->getMetadataDriverImpl(); |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | } |
786 | 786 | ); |
787 | 787 | |
788 | - $this->extend('orm.em', function (\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
788 | + $this->extend('orm.em', function(\Doctrine\ORM\EntityManager $em, \Silex\Application $app) { |
|
789 | 789 | // save |
790 | 790 | $saveEventSubscriber = new \Eccube\Doctrine\EventSubscriber\SaveEventSubscriber($app); |
791 | 791 | $em->getEventManager()->addEventSubscriber($saveEventSubscriber); |
@@ -810,7 +810,7 @@ discard block |
||
810 | 810 | // second level cacheの設定. |
811 | 811 | $this->extend( |
812 | 812 | 'orm.em.config', |
813 | - function (\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
813 | + function(\Doctrine\ORM\Configuration $config, \Silex\Application $app) { |
|
814 | 814 | $config->setSecondLevelCacheEnabled(); |
815 | 815 | $cacheConfig = $config->getSecondLevelCacheConfiguration(); |
816 | 816 | $regionConfig = $cacheConfig->getRegionsConfiguration(); |
@@ -899,31 +899,31 @@ discard block |
||
899 | 899 | array('^/mypage', 'ROLE_USER', $channel), |
900 | 900 | ); |
901 | 901 | |
902 | - $this['eccube.password_encoder'] = function ($app) { |
|
902 | + $this['eccube.password_encoder'] = function($app) { |
|
903 | 903 | return new \Eccube\Security\Core\Encoder\PasswordEncoder($app['config']); |
904 | 904 | }; |
905 | - $this['security.encoder_factory'] = function ($app) { |
|
905 | + $this['security.encoder_factory'] = function($app) { |
|
906 | 906 | return new \Symfony\Component\Security\Core\Encoder\EncoderFactory(array( |
907 | 907 | 'Eccube\Entity\Customer' => $app['eccube.password_encoder'], |
908 | 908 | 'Eccube\Entity\Member' => $app['eccube.password_encoder'], |
909 | 909 | )); |
910 | 910 | }; |
911 | - $this['eccube.event_listner.security'] = function ($app) { |
|
911 | + $this['eccube.event_listner.security'] = function($app) { |
|
912 | 912 | return new \Eccube\EventListener\SecurityEventListener($app['orm.em']); |
913 | 913 | }; |
914 | 914 | |
915 | 915 | // Voterの設定 |
916 | - $this['authority_voter'] = function ($app) { |
|
916 | + $this['authority_voter'] = function($app) { |
|
917 | 917 | return new \Eccube\Security\Voter\AuthorityVoter($app); |
918 | 918 | }; |
919 | 919 | |
920 | - $this->extend('security.voters', function ($voters, \Silex\Application $app) { |
|
920 | + $this->extend('security.voters', function($voters, \Silex\Application $app) { |
|
921 | 921 | $voters[] = $app['authority_voter']; |
922 | 922 | |
923 | 923 | return $voters; |
924 | 924 | }); |
925 | 925 | |
926 | - $this['security.access_manager'] = function ($app) { |
|
926 | + $this['security.access_manager'] = function($app) { |
|
927 | 927 | return new \Symfony\Component\Security\Core\Authorization\AccessDecisionManager($app['security.voters'], 'unanimous'); |
928 | 928 | }; |
929 | 929 | |
@@ -937,7 +937,7 @@ discard block |
||
937 | 937 | { |
938 | 938 | $config = $this['config']; |
939 | 939 | if (isset($config['trusted_proxies_connection_only']) && !empty($config['trusted_proxies_connection_only'])) { |
940 | - $this->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($config) { |
|
940 | + $this->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($config) { |
|
941 | 941 | // サブリクエストのREMOTE_ADDRも動的に設定を行う必要があるため、KernelEvents::REQUESTを使用する |
942 | 942 | Request::setTrustedProxies(array_merge(array($event->getRequest()->server->get('REMOTE_ADDR')), $config['trusted_proxies'])); |
943 | 943 | }, self::EARLY_EVENT); |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | $this->register(new ServiceProvider\EccubePluginServiceProvider()); |
955 | 955 | |
956 | 956 | // TODO Acme\ServiceProvider の初期化はここで OK? |
957 | - if (array_key_exists('service',$this['config'])) { |
|
957 | + if (array_key_exists('service', $this['config'])) { |
|
958 | 958 | foreach ($this['config']['service'] as $service) { |
959 | 959 | $this->register(new $service); |
960 | 960 | } |
@@ -1096,7 +1096,7 @@ discard block |
||
1096 | 1096 | $app = $this; |
1097 | 1097 | |
1098 | 1098 | // Response Event(http cache対応、event実行は一番遅く設定) |
1099 | - $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
1099 | + $this->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
1100 | 1100 | |
1101 | 1101 | if (!$event->isMasterRequest()) { |
1102 | 1102 | return; |
@@ -11,7 +11,7 @@ |
||
11 | 11 | { |
12 | 12 | public function register(Container $app) |
13 | 13 | { |
14 | - $app['paginator'] = $app->protect(function () { |
|
14 | + $app['paginator'] = $app->protect(function() { |
|
15 | 15 | $paginator = new Paginator(); |
16 | 16 | $paginator->subscribe(new PaginatorListener()); |
17 | 17 |