@@ -30,7 +30,7 @@ |
||
30 | 30 | { |
31 | 31 | /** |
32 | 32 | * RepositoryAutoWiring constructor. |
33 | - * @param array|string[] $scanDirs |
|
33 | + * @param string[] $scanDirs |
|
34 | 34 | */ |
35 | 35 | public function __construct($scanDirs) |
36 | 36 | { |
@@ -161,7 +161,9 @@ |
||
161 | 161 | } |
162 | 162 | |
163 | 163 | if (!empty($components)) { |
164 | - if ($snippets) $snippets .= PHP_EOL; |
|
164 | + if ($snippets) { |
|
165 | + $snippets .= PHP_EOL; |
|
166 | + } |
|
165 | 167 | $snippets .= $wiring->generate($twig, $components); |
166 | 168 | $snippets .= $wiring->generateExtend($twig, $components); |
167 | 169 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | public function register(Container $app) |
15 | 15 | { |
16 | - $app['eccube.di'] = function (Container $app) { |
|
16 | + $app['eccube.di'] = function(Container $app) { |
|
17 | 17 | $di = new Di( |
18 | 18 | $app['eccube.di.generator.dir'], |
19 | 19 | $app['eccube.di.generator.class'], |
@@ -6,9 +6,6 @@ |
||
6 | 6 | use Eccube\Annotation\ForwardOnly; |
7 | 7 | use Monolog\Logger; |
8 | 8 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
9 | -use Symfony\Component\HttpFoundation\Request; |
|
10 | -use Symfony\Component\HttpFoundation\Response; |
|
11 | -use Symfony\Component\HttpFoundation\Session\SessionInterface; |
|
12 | 9 | use Symfony\Component\HttpKernel\Event\FilterControllerEvent; |
13 | 10 | use Symfony\Component\HttpKernel\KernelEvents; |
14 | 11 |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | public function register(Container $app) |
28 | 28 | { |
29 | 29 | // EventDispatcher |
30 | - $app['eccube.event.dispatcher'] = function () { |
|
30 | + $app['eccube.event.dispatcher'] = function() { |
|
31 | 31 | return new EventDispatcher(); |
32 | 32 | }; |
33 | 33 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | $enabledPlugins = $app['orm.em']->getRepository('Eccube\Entity\Plugin')->findAllEnabled(); |
38 | 38 | |
39 | - $app['eccube.routers.plugin'] = function ($app) use ($enabledPlugins) { |
|
39 | + $app['eccube.routers.plugin'] = function($app) use ($enabledPlugins) { |
|
40 | 40 | $pluginDirs = array_map(function($plugin) use ($app) { |
41 | 41 | return $app['config']['root_dir'].'/app/Plugin/'.$plugin->getCode(); |
42 | 42 | }, $enabledPlugins); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $config = $pluginConfig['config']; |
64 | 64 | |
65 | 65 | if (isset($config['const'])) { |
66 | - $app->extend('config', function ($eccubeConfig) use ($config) { |
|
66 | + $app->extend('config', function($eccubeConfig) use ($config) { |
|
67 | 67 | $eccubeConfig[$config['code']] = array( |
68 | 68 | 'const' => $config['const'], |
69 | 69 | ); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | public function initPluginEventDispatcher(Application $app) |
86 | 86 | { |
87 | 87 | // hook point |
88 | - $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
88 | + $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
89 | 89 | if (!$event->isMasterRequest()) { |
90 | 90 | return; |
91 | 91 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
94 | 94 | }, Application::EARLY_EVENT); |
95 | 95 | |
96 | - $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
96 | + $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
97 | 97 | if (!$event->isMasterRequest()) { |
98 | 98 | return; |
99 | 99 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
103 | 103 | }); |
104 | 104 | |
105 | - $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
105 | + $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
106 | 106 | if (!$event->isMasterRequest()) { |
107 | 107 | return; |
108 | 108 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
112 | 112 | }); |
113 | 113 | |
114 | - $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
114 | + $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
115 | 115 | if (!$event->isMasterRequest()) { |
116 | 116 | return; |
117 | 117 | } |
@@ -119,13 +119,13 @@ discard block |
||
119 | 119 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
120 | 120 | }, Application::LATE_EVENT); |
121 | 121 | |
122 | - $app->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) { |
|
122 | + $app->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) { |
|
123 | 123 | $route = $event->getRequest()->attributes->get('_route'); |
124 | 124 | $hookpoint = "eccube.event.controller.$route.finish"; |
125 | 125 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
126 | 126 | }); |
127 | 127 | |
128 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
128 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
129 | 129 | if (!$event->isMasterRequest()) { |
130 | 130 | return; |
131 | 131 | } |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | }); |
135 | 135 | |
136 | 136 | // Request Event |
137 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
137 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
138 | 138 | |
139 | 139 | if (!$event->isMasterRequest()) { |
140 | 140 | return; |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | }, 30); // Routing(32)が解決し, 認証判定(8)が実行される前のタイミング. |
166 | 166 | |
167 | 167 | // Controller Event |
168 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
168 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
169 | 169 | |
170 | 170 | if (!$event->isMasterRequest()) { |
171 | 171 | return; |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | }); |
195 | 195 | |
196 | 196 | // Response Event |
197 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
197 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
198 | 198 | if (!$event->isMasterRequest()) { |
199 | 199 | return; |
200 | 200 | } |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | }); |
224 | 224 | |
225 | 225 | // Exception Event |
226 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
226 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
227 | 227 | |
228 | 228 | if (!$event->isMasterRequest()) { |
229 | 229 | return; |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | }); |
254 | 254 | |
255 | 255 | // Terminate Event |
256 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
256 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
257 | 257 | |
258 | 258 | $route = $event->getRequest()->attributes->get('_route'); |
259 | 259 |
@@ -32,7 +32,6 @@ |
||
32 | 32 | use Eccube\Controller\AbstractController; |
33 | 33 | use Eccube\Entity\BaseInfo; |
34 | 34 | use Eccube\Entity\CustomerFavoriteProduct; |
35 | -use Eccube\Entity\Product; |
|
36 | 35 | use Eccube\Event\EccubeEvents; |
37 | 36 | use Eccube\Event\EventArgs; |
38 | 37 | use Eccube\Exception\CartException; |
@@ -392,7 +392,7 @@ |
||
392 | 392 | /** |
393 | 393 | * 会員の初回購入時間、購入時間、購入回数、購入金額を更新する |
394 | 394 | * |
395 | - * @param $app |
|
395 | + * @param \Eccube\Application $app |
|
396 | 396 | * @param Customer $Customer |
397 | 397 | * @param $orderStatusId |
398 | 398 | */ |
@@ -114,7 +114,7 @@ |
||
114 | 114 | */ |
115 | 115 | public function delete($News) |
116 | 116 | { |
117 | - $this->createQueryBuilder('n') |
|
117 | + $this->createQueryBuilder('n') |
|
118 | 118 | ->update() |
119 | 119 | ->set('n.rank', 'n.rank - 1') |
120 | 120 | ->where('n.rank > :rank') |
@@ -122,7 +122,7 @@ |
||
122 | 122 | $News = new \Eccube\Entity\News(); |
123 | 123 | } |
124 | 124 | |
125 | - $News->setLinkMethod((bool)$News->getLinkMethod()); |
|
125 | + $News->setLinkMethod((bool) $News->getLinkMethod()); |
|
126 | 126 | |
127 | 127 | $builder = $this->formFactory |
128 | 128 | ->createBuilder(NewsType::class, $News); |