@@ -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'], |
@@ -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); |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $num = $this->productClassRepository->createQueryBuilder('pc') |
183 | 183 | ->select('count(pc.id)') |
184 | 184 | ->where('pc.ClassCategory1 = :id OR pc.ClassCategory2 = :id') |
185 | - ->setParameter('id',$id) |
|
185 | + ->setParameter('id', $id) |
|
186 | 186 | ->getQuery() |
187 | 187 | ->getSingleScalarResult(); |
188 | 188 | if ($num > 0) { |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | log_error('規格分類削除エラー', array($id, $e)); |
209 | 209 | |
210 | 210 | $message = $app->trans('admin.delete.failed.foreign_key', ['%name%' => '規格分類']); |
211 | - $app->addError($message, 'admin'); } |
|
211 | + $app->addError($message, 'admin'); } |
|
212 | 212 | } |
213 | 213 | |
214 | 214 | return $app->redirect($app->url('admin_product_class_category', array('class_name_id' => $ClassName->getId()))); |
@@ -148,7 +148,7 @@ |
||
148 | 148 | try { |
149 | 149 | $this->classNameRepository->delete($ClassName); |
150 | 150 | |
151 | - $event = new EventArgs(['ClassName' => $ClassName,], $request); |
|
151 | + $event = new EventArgs(['ClassName' => $ClassName, ], $request); |
|
152 | 152 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_PRODUCT_CLASS_NAME_DELETE_COMPLETE, $event); |
153 | 153 | |
154 | 154 | $app->addSuccess('admin.class_name.delete.complete', 'admin'); |
@@ -242,7 +242,7 @@ |
||
242 | 242 | $this->eventDispatcher->dispatch(EccubeEvents::ADMIN_SETTING_SHOP_PAYMENT_DELETE_COMPLETE, $event); |
243 | 243 | |
244 | 244 | $app->addSuccess('admin.delete.complete', 'admin'); |
245 | - } catch(ForeignKeyConstraintViolationException $e) { |
|
245 | + } catch (ForeignKeyConstraintViolationException $e) { |
|
246 | 246 | $this->entityManager->rollback(); |
247 | 247 | |
248 | 248 | $message = $app->trans('admin.delete.failed.foreign_key', ['%name%' => '支払方法']); |