@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $key = sprintf('keyword%s', $index); |
114 | 114 | $qb |
115 | 115 | ->andWhere(sprintf('NORMALIZE(p.name) LIKE NORMALIZE(:%s) OR NORMALIZE(p.search_word) LIKE NORMALIZE(:%s)', $key, $key)) |
116 | - ->setParameter($key, '%' . $keyword . '%'); |
|
116 | + ->setParameter($key, '%'.$keyword.'%'); |
|
117 | 117 | } |
118 | 118 | } |
119 | 119 | |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $qb |
177 | 177 | ->andWhere('p.id = :id OR p.name LIKE :likeid OR pc.code LIKE :likeid') |
178 | 178 | ->setParameter('id', $id) |
179 | - ->setParameter('likeid', '%' . $searchData['id'] . '%'); |
|
179 | + ->setParameter('likeid', '%'.$searchData['id'].'%'); |
|
180 | 180 | } |
181 | 181 | |
182 | 182 | // code |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | * @param array $metadatas |
349 | 349 | * @param array $fsList |
350 | 350 | * @param $pluginCode |
351 | - * @param $codePath |
|
351 | + * @param string $codePath |
|
352 | 352 | */ |
353 | 353 | protected function generateMigration(array $metadatas, array &$fsList = array(), $pluginCode, $codePath) |
354 | 354 | { |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * |
374 | 374 | * @param $pluginCode |
375 | 375 | * @param array $metadatas |
376 | - * @return mixed|string |
|
376 | + * @return string |
|
377 | 377 | */ |
378 | 378 | protected function makeMigration($pluginCode, array $metadatas) |
379 | 379 | { |
@@ -33,7 +33,6 @@ |
||
33 | 33 | use Symfony\Component\Console\Input\InputOption; |
34 | 34 | use Symfony\Component\Console\Output\OutputInterface; |
35 | 35 | use Symfony\Component\Console\Question\Question; |
36 | -use Symfony\Component\Validator\Constraints as Assert; |
|
37 | 36 | |
38 | 37 | class PluginCommand extends \Knp\Command\Command |
39 | 38 | { |
@@ -2,15 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Eccube\Application; |
4 | 4 | |
5 | -use Eccube\Event\TemplateEvent; |
|
6 | -use Monolog\Logger; |
|
7 | -use Symfony\Component\Form\FormBuilder; |
|
8 | 5 | use Symfony\Component\HttpFoundation\Request; |
9 | 6 | use Symfony\Component\HttpFoundation\Response; |
10 | -use Symfony\Component\HttpFoundation\StreamedResponse; |
|
11 | 7 | use Symfony\Component\HttpKernel\HttpKernelInterface; |
12 | -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; |
|
13 | -use Symfony\Component\Security\Core\User\UserInterface; |
|
14 | 8 | |
15 | 9 | trait ApplicationTrait |
16 | 10 | { |
@@ -19,32 +19,32 @@ discard block |
||
19 | 19 | */ |
20 | 20 | public function addSuccess($message, $namespace = 'front') |
21 | 21 | { |
22 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.success', $message); |
|
22 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.success', $message); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | public function addError($message, $namespace = 'front') |
26 | 26 | { |
27 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.error', $message); |
|
27 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.error', $message); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | public function addDanger($message, $namespace = 'front') |
31 | 31 | { |
32 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.danger', $message); |
|
32 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.danger', $message); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function addWarning($message, $namespace = 'front') |
36 | 36 | { |
37 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.warning', $message); |
|
37 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.warning', $message); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function addInfo($message, $namespace = 'front') |
41 | 41 | { |
42 | - $this['session']->getFlashBag()->add('eccube.' . $namespace . '.info', $message); |
|
42 | + $this['session']->getFlashBag()->add('eccube.'.$namespace.'.info', $message); |
|
43 | 43 | } |
44 | 44 | |
45 | 45 | public function addRequestError($message, $namespace = 'front') |
46 | 46 | { |
47 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.request.error', $message); |
|
47 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.request.error', $message); |
|
48 | 48 | } |
49 | 49 | |
50 | 50 | public function clearMessage() |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | if (is_null($namespace)) { |
64 | 64 | $this['session']->getFlashBag()->set('eccube.login.target.path', $targetPath); |
65 | 65 | } else { |
66 | - $this['session']->getFlashBag()->set('eccube.' . $namespace . '.login.target.path', $targetPath); |
|
66 | + $this['session']->getFlashBag()->set('eccube.'.$namespace.'.login.target.path', $targetPath); |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | * @param Response $response |
112 | 112 | * @return Application |
113 | 113 | */ |
114 | - public function forwardChain($path, array $requestParameters = [], Response &$response = null) |
|
114 | + public function forwardChain($path, array $requestParameters = [], Response&$response = null) |
|
115 | 115 | { |
116 | 116 | $response = $this->forward($path, $requestParameters); |
117 | 117 | return $this; |
@@ -16,6 +16,7 @@ discard block |
||
16 | 16 | { |
17 | 17 | /** |
18 | 18 | * Application Shortcut Methods |
19 | + * @param string $message |
|
19 | 20 | */ |
20 | 21 | public function addSuccess($message, $namespace = 'front') |
21 | 22 | { |
@@ -58,6 +59,9 @@ discard block |
||
58 | 59 | $this->addWarning('admin.delete.warning', 'admin'); |
59 | 60 | } |
60 | 61 | |
62 | + /** |
|
63 | + * @param string $targetPath |
|
64 | + */ |
|
61 | 65 | public function setLoginTargetPath($targetPath, $namespace = null) |
62 | 66 | { |
63 | 67 | if (is_null($namespace)) { |
@@ -109,7 +113,7 @@ discard block |
||
109 | 113 | * @param string $path フォワード先のパス |
110 | 114 | * @param array $requestParameters |
111 | 115 | * @param Response $response |
112 | - * @return Application |
|
116 | + * @return ApplicationTrait |
|
113 | 117 | */ |
114 | 118 | public function forwardChain($path, array $requestParameters = [], Response &$response = null) |
115 | 119 | { |
@@ -27,8 +27,6 @@ |
||
27 | 27 | use Symfony\Component\Form\Extension\Core\Type\PasswordType; |
28 | 28 | use Symfony\Component\Form\Extension\Core\Type\RepeatedType; |
29 | 29 | use Symfony\Component\Form\FormBuilderInterface; |
30 | -use Symfony\Component\Form\FormError; |
|
31 | -use Symfony\Component\Form\FormEvents; |
|
32 | 30 | use Symfony\Component\OptionsResolver\OptionsResolver; |
33 | 31 | use Symfony\Component\Security\Core\Validator\Constraints\UserPassword; |
34 | 32 | use Symfony\Component\Validator\Constraints as Assert; |
@@ -39,7 +39,7 @@ |
||
39 | 39 | * This method should only be used to configure services and parameters. |
40 | 40 | * It should not get services. |
41 | 41 | * |
42 | - * @param BaseApplication $app An Application instance |
|
42 | + * @param Container $app An Application instance |
|
43 | 43 | */ |
44 | 44 | public function register(Container $app) |
45 | 45 | { |
@@ -69,15 +69,15 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function register(Container $app) |
71 | 71 | { |
72 | - $app[BaseInfo::class] = function () use ($app) { |
|
72 | + $app[BaseInfo::class] = function() use ($app) { |
|
73 | 73 | return $app[BaseInfoRepository::class]->get(); |
74 | 74 | }; |
75 | 75 | |
76 | - $app['eccube.calculate.context'] = function () use ($app) { |
|
76 | + $app['eccube.calculate.context'] = function() use ($app) { |
|
77 | 77 | return new \Eccube\Service\Calculator\CalculateContext(); |
78 | 78 | }; |
79 | 79 | |
80 | - $app['eccube.calculate.strategies'] = function () use ($app) { |
|
80 | + $app['eccube.calculate.strategies'] = function() use ($app) { |
|
81 | 81 | $Collection = new \Eccube\Service\Calculator\CalculateStrategyCollection(); |
82 | 82 | $Collection->setApplication($app); |
83 | 83 | //$Collection->setOrder($Order); |
@@ -90,47 +90,47 @@ discard block |
||
90 | 90 | $Collection->add($app['eccube.calculate.strategy.calculate_total']); |
91 | 91 | return $Collection; |
92 | 92 | }; |
93 | - $app['eccube.calculate.strategy.shipping'] = function () use ($app) { |
|
93 | + $app['eccube.calculate.strategy.shipping'] = function() use ($app) { |
|
94 | 94 | $Strategy = new \Eccube\Service\Calculator\Strategy\ShippingStrategy(); |
95 | 95 | $Strategy->setApplication($app); |
96 | 96 | return $Strategy; |
97 | 97 | }; |
98 | - $app['eccube.calculate.strategy.charge'] = function () use ($app) { |
|
98 | + $app['eccube.calculate.strategy.charge'] = function() use ($app) { |
|
99 | 99 | $Strategy = new \Eccube\Service\Calculator\Strategy\ChargeStrategy(); |
100 | 100 | $Strategy->setApplication($app); |
101 | 101 | return $Strategy; |
102 | 102 | }; |
103 | 103 | |
104 | - $app['eccube.calculate.strategy.tax'] = function () use ($app) { |
|
104 | + $app['eccube.calculate.strategy.tax'] = function() use ($app) { |
|
105 | 105 | $Strategy = new \Eccube\Service\Calculator\Strategy\TaxStrategy(); |
106 | 106 | $Strategy->setApplication($app); |
107 | 107 | return $Strategy; |
108 | 108 | }; |
109 | 109 | |
110 | - $app['eccube.calculate.strategy.calculate_delivery_fee'] = function () use ($app) { |
|
110 | + $app['eccube.calculate.strategy.calculate_delivery_fee'] = function() use ($app) { |
|
111 | 111 | $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateDeliveryFeeStrategy(); |
112 | 112 | $Strategy->setApplication($app); |
113 | 113 | return $Strategy; |
114 | 114 | }; |
115 | - $app['eccube.calculate.strategy.calculate_charge'] = function () use ($app) { |
|
115 | + $app['eccube.calculate.strategy.calculate_charge'] = function() use ($app) { |
|
116 | 116 | $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateChargeStrategy(); |
117 | 117 | $Strategy->setApplication($app); |
118 | 118 | return $Strategy; |
119 | 119 | }; |
120 | - $app['eccube.calculate.strategy.calculate_total'] = function () use ($app) { |
|
120 | + $app['eccube.calculate.strategy.calculate_total'] = function() use ($app) { |
|
121 | 121 | $Strategy = new \Eccube\Service\Calculator\Strategy\CalculateTotalStrategy(); |
122 | 122 | $Strategy->setApplication($app); |
123 | 123 | return $Strategy; |
124 | 124 | }; |
125 | 125 | |
126 | - $app['payment.method'] = $app->protect(function ($clazz, $form) use ($app) { |
|
126 | + $app['payment.method'] = $app->protect(function($clazz, $form) use ($app) { |
|
127 | 127 | $PaymentMethod = new $clazz; |
128 | 128 | $PaymentMethod->setApplication($app); |
129 | 129 | $PaymentMethod->setFormType($form); |
130 | 130 | return $PaymentMethod; |
131 | 131 | }); |
132 | 132 | |
133 | - $app['payment.method.request'] = $app->protect(function ($clazz, $form, $request) use ($app) { |
|
133 | + $app['payment.method.request'] = $app->protect(function($clazz, $form, $request) use ($app) { |
|
134 | 134 | $PaymentMethod = new $clazz; |
135 | 135 | $PaymentMethod->setApplication($app); |
136 | 136 | $PaymentMethod->setFormType($form); |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | return $PaymentMethod; |
139 | 139 | }); |
140 | 140 | |
141 | - $app['eccube.service.calculate'] = $app->protect(function ($Order, $Customer) use ($app) { |
|
141 | + $app['eccube.service.calculate'] = $app->protect(function($Order, $Customer) use ($app) { |
|
142 | 142 | $Service = new \Eccube\Service\CalculateService($Order, $Customer); |
143 | 143 | $Context = $app['eccube.calculate.context']; |
144 | 144 | $app['eccube.calculate.strategies']->setOrder($Order); |
@@ -149,24 +149,24 @@ discard block |
||
149 | 149 | return $Service; |
150 | 150 | }); |
151 | 151 | |
152 | - $app['eccube.service.payment'] = $app->protect(function ($clazz) use ($app) { |
|
152 | + $app['eccube.service.payment'] = $app->protect(function($clazz) use ($app) { |
|
153 | 153 | $Service = new $clazz($app['request_stack']); |
154 | 154 | |
155 | 155 | return $Service; |
156 | 156 | }); |
157 | 157 | |
158 | - $app['paginator'] = $app->protect(function () { |
|
158 | + $app['paginator'] = $app->protect(function() { |
|
159 | 159 | $paginator = new \Knp\Component\Pager\Paginator(); |
160 | 160 | $paginator->subscribe(new \Eccube\EventListener\PaginatorListener()); |
161 | 161 | |
162 | 162 | return $paginator; |
163 | 163 | }); |
164 | 164 | |
165 | - $app['request_scope'] = function () { |
|
165 | + $app['request_scope'] = function() { |
|
166 | 166 | return new ParameterBag(); |
167 | 167 | }; |
168 | 168 | // TODO 使用するか検討 |
169 | - $app['eccube.twig.node.hello'] = $app->protect(function ($node, $compiler) { |
|
169 | + $app['eccube.twig.node.hello'] = $app->protect(function($node, $compiler) { |
|
170 | 170 | $compiler |
171 | 171 | ->addDebugInfo($node) |
172 | 172 | ->write("echo 'Helloooooo ' . ") |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | }); |
178 | 178 | // TODO 使用するか検討 |
179 | - $app['eccube.twig.node.jiro'] = $app->protect(function ($node, $compiler) { |
|
179 | + $app['eccube.twig.node.jiro'] = $app->protect(function($node, $compiler) { |
|
180 | 180 | $compiler |
181 | 181 | ->addDebugInfo($node) |
182 | 182 | ->write("echo 'jirooooooo ' . ") |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | }); |
188 | 188 | |
189 | 189 | // TODO 使用するか検討 |
190 | - $app['eccube.twig.generic_node_names'] = function () use ($app) { |
|
190 | + $app['eccube.twig.generic_node_names'] = function() use ($app) { |
|
191 | 191 | return [ |
192 | 192 | 'hello', |
193 | 193 | 'jiro', |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | }; |
197 | 197 | |
198 | 198 | // TODO 使用するか検討 |
199 | - $app['twig_parsers'] = function () use ($app) { |
|
199 | + $app['twig_parsers'] = function() use ($app) { |
|
200 | 200 | $GenericTokenParsers = []; |
201 | 201 | foreach ($app['eccube.twig.generic_node_names'] as $tagName) { |
202 | 202 | $GenericTokenParsers[] = new \Eccube\Twig\Extension\GenericTokenParser($app, $tagName); |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | return $GenericTokenParsers; |
205 | 205 | }; |
206 | 206 | |
207 | - $app['eccube.twig.block.templates'] = function () { |
|
207 | + $app['eccube.twig.block.templates'] = function() { |
|
208 | 208 | $templates = new ArrayCollection(); |
209 | 209 | $templates[] = 'render_block.twig'; |
210 | 210 | |
@@ -212,17 +212,17 @@ discard block |
||
212 | 212 | }; |
213 | 213 | |
214 | 214 | $app['eccube.entity.event.dispatcher']->addEventListener(new \Acme\Entity\SoldOutEventListener()); |
215 | - $app['eccube.queries'] = function () { |
|
215 | + $app['eccube.queries'] = function() { |
|
216 | 216 | return new \Eccube\Doctrine\Query\Queries(); |
217 | 217 | }; |
218 | 218 | // TODO QueryCustomizerの追加方法は要検討 |
219 | 219 | $app['eccube.queries']->addCustomizer(new \Acme\Entity\AdminProductListCustomizer()); |
220 | 220 | |
221 | - $app['eccube.purchase.context'] = $app->protect(function (ItemHolderInterface $origin = null) { |
|
221 | + $app['eccube.purchase.context'] = $app->protect(function(ItemHolderInterface $origin = null) { |
|
222 | 222 | return new PurchaseContext($origin); |
223 | 223 | }); |
224 | 224 | |
225 | - $app['eccube.purchase.flow.cart.item_processors'] = function ($app) { |
|
225 | + $app['eccube.purchase.flow.cart.item_processors'] = function($app) { |
|
226 | 226 | $processors = new ArrayCollection(); |
227 | 227 | $processors->add(new DeletedProductValidator()); |
228 | 228 | $processors->add(new DisplayStatusValidator()); |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | return $processors; |
233 | 233 | }; |
234 | 234 | |
235 | - $app['eccube.purchase.flow.cart.holder_processors'] = function ($app) { |
|
235 | + $app['eccube.purchase.flow.cart.holder_processors'] = function($app) { |
|
236 | 236 | $processors = new ArrayCollection(); |
237 | 237 | $processors->add(new PaymentProcessor($app[DeliveryRepository::class])); |
238 | 238 | $processors->add(new PaymentTotalLimitValidator($app['config']['max_total_fee'])); |
@@ -242,34 +242,34 @@ discard block |
||
242 | 242 | return $processors; |
243 | 243 | }; |
244 | 244 | |
245 | - $app['eccube.purchase.flow.cart.add_item_processors'] = function ($app) { |
|
245 | + $app['eccube.purchase.flow.cart.add_item_processors'] = function($app) { |
|
246 | 246 | return new ArrayCollection([ |
247 | 247 | new AddItemProcessor($app['eccube.purchase.flow.cart.item_comparer']), |
248 | 248 | ]); |
249 | 249 | }; |
250 | 250 | |
251 | 251 | // example |
252 | - $app->extend('eccube.purchase.flow.cart.item_processors', function ($processors, $app) { |
|
252 | + $app->extend('eccube.purchase.flow.cart.item_processors', function($processors, $app) { |
|
253 | 253 | |
254 | 254 | $processors->add(new StockValidator()); |
255 | 255 | |
256 | 256 | return $processors; |
257 | 257 | }); |
258 | 258 | |
259 | - $app['eccube.purchase.flow.cart.item_comparer'] = function ($app) { |
|
259 | + $app['eccube.purchase.flow.cart.item_comparer'] = function($app) { |
|
260 | 260 | return new ItemComparerCollection([ |
261 | 261 | $app['eccube.purchase.flow.item_comparer.product_class'], |
262 | 262 | $app['eccube.purchase.flow.item_comparer.price'], |
263 | 263 | ]); |
264 | 264 | }; |
265 | 265 | |
266 | - $app['eccube.purchase.flow.order.add_item_processors'] = function ($app) { |
|
266 | + $app['eccube.purchase.flow.order.add_item_processors'] = function($app) { |
|
267 | 267 | return new ArrayCollection([ |
268 | 268 | new AddItemProcessor($app['eccube.purchase.flow.order.item_comparer']), |
269 | 269 | ]); |
270 | 270 | }; |
271 | 271 | |
272 | - $app['eccube.purchase.flow.order.item_comparer'] = function ($app) { |
|
272 | + $app['eccube.purchase.flow.order.item_comparer'] = function($app) { |
|
273 | 273 | return new ItemComparerCollection([ |
274 | 274 | $app['eccube.purchase.flow.item_comparer.product_class'], |
275 | 275 | $app['eccube.purchase.flow.item_comparer.price'], |
@@ -278,23 +278,23 @@ discard block |
||
278 | 278 | ]); |
279 | 279 | }; |
280 | 280 | |
281 | - $app['eccube.purchase.flow.item_comparer.product_class'] = function ($app) { |
|
281 | + $app['eccube.purchase.flow.item_comparer.product_class'] = function($app) { |
|
282 | 282 | return new ProductClassComparer(); |
283 | 283 | }; |
284 | 284 | |
285 | - $app['eccube.purchase.flow.item_comparer.price'] = function ($app) { |
|
285 | + $app['eccube.purchase.flow.item_comparer.price'] = function($app) { |
|
286 | 286 | return new PriceComparer(); |
287 | 287 | }; |
288 | 288 | |
289 | - $app['eccube.purchase.flow.item_comparer.tax'] = function ($app) { |
|
289 | + $app['eccube.purchase.flow.item_comparer.tax'] = function($app) { |
|
290 | 290 | return new TaxComparer(); |
291 | 291 | }; |
292 | 292 | |
293 | - $app['eccube.purchase.flow.item_comparer.order_item_type'] = function ($app) { |
|
293 | + $app['eccube.purchase.flow.item_comparer.order_item_type'] = function($app) { |
|
294 | 294 | return new OrderItemTypeComparer(); |
295 | 295 | }; |
296 | 296 | |
297 | - $app['eccube.purchase.flow.cart'] = function ($app) { |
|
297 | + $app['eccube.purchase.flow.cart'] = function($app) { |
|
298 | 298 | $flow = new PurchaseFlow(); |
299 | 299 | $flow->setItemProcessors($app['eccube.purchase.flow.cart.item_processors']); |
300 | 300 | $flow->setItemHolderProcessors($app['eccube.purchase.flow.cart.holder_processors']); |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | return $flow; |
304 | 304 | }; |
305 | 305 | |
306 | - $app['eccube.purchase.flow.shopping'] = function () use ($app) { |
|
306 | + $app['eccube.purchase.flow.shopping'] = function() use ($app) { |
|
307 | 307 | $flow = new PurchaseFlow(); |
308 | 308 | $flow->addItemProcessor(new StockValidator()); |
309 | 309 | $flow->addItemProcessor(new DisplayStatusValidator()); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | return $flow; |
314 | 314 | }; |
315 | 315 | |
316 | - $app['eccube.purchase.flow.order'] = function () use ($app) { |
|
316 | + $app['eccube.purchase.flow.order'] = function() use ($app) { |
|
317 | 317 | $flow = new PurchaseFlow(); |
318 | 318 | $flow->addItemProcessor(new StockValidator()); |
319 | 319 | $flow->addItemHolderProcessor(new PaymentTotalLimitValidator($app['config']['max_total_fee'])); |
@@ -40,14 +40,14 @@ |
||
40 | 40 | $eventName = $view; |
41 | 41 | if ($this->isAdminRequest()) { |
42 | 42 | // 管理画面の場合、event名に「Admin/」を付ける |
43 | - $eventName = 'Admin/' . $view; |
|
43 | + $eventName = 'Admin/'.$view; |
|
44 | 44 | } |
45 | - $this['monolog']->debug('Template Event Name : ' . $eventName); |
|
45 | + $this['monolog']->debug('Template Event Name : '.$eventName); |
|
46 | 46 | |
47 | 47 | // $this['eccube.event.dispatcher']->dispatch($eventName, $event); |
48 | 48 | |
49 | 49 | if ($response instanceof StreamedResponse) { |
50 | - $response->setCallback(function () use ($twig, $view, $parameters) { |
|
50 | + $response->setCallback(function() use ($twig, $view, $parameters) { |
|
51 | 51 | $twig->display($view, $parameters); |
52 | 52 | }); |
53 | 53 | } else { |
@@ -22,17 +22,17 @@ discard block |
||
22 | 22 | $app->register(new \Silex\Provider\MonologServiceProvider()); |
23 | 23 | |
24 | 24 | // Log |
25 | - $app['eccube.logger'] = function ($app) { |
|
25 | + $app['eccube.logger'] = function($app) { |
|
26 | 26 | return new Logger($app); |
27 | 27 | }; |
28 | 28 | |
29 | 29 | // ヘルパー作成 |
30 | - $app['eccube.monolog.helper'] = function ($app) { |
|
30 | + $app['eccube.monolog.helper'] = function($app) { |
|
31 | 31 | return new LogHelper($app); |
32 | 32 | }; |
33 | 33 | |
34 | 34 | // ログクラス作成ファクトリー |
35 | - $app['eccube.monolog.factory'] = $app->protect(function (array $channelValues) use ($app) { |
|
35 | + $app['eccube.monolog.factory'] = $app->protect(function(array $channelValues) use ($app) { |
|
36 | 36 | |
37 | 37 | $log = new $app['monolog.logger.class']($channelValues['name']); |
38 | 38 | |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | // monologの設定は除外 |
48 | 48 | unset($channels['monolog']); |
49 | 49 | foreach ($channels as $channel => $channelValues) { |
50 | - $app['monolog.logger.'.$channel] = function ($app) use ($channelValues) { |
|
50 | + $app['monolog.logger.'.$channel] = function($app) use ($channelValues) { |
|
51 | 51 | return $app['eccube.monolog.factory']($channelValues); |
52 | 52 | }; |
53 | 53 | } |
@@ -55,15 +55,15 @@ discard block |
||
55 | 55 | // MonologServiceProviderで定義されているmonolog.handlerの置換 |
56 | 56 | $channelValues = $app['config']['log']['channel']['monolog']; |
57 | 57 | $app['monolog.name'] = $channelValues['name']; |
58 | - $app['monolog.handler'] = function ($app) use ($channelValues) { |
|
58 | + $app['monolog.handler'] = function($app) use ($channelValues) { |
|
59 | 59 | return $app['eccube.monolog.helper']->getHandler($channelValues); |
60 | 60 | }; |
61 | 61 | |
62 | - $app['eccube.monolog.listener'] = function () use ($app) { |
|
62 | + $app['eccube.monolog.listener'] = function() use ($app) { |
|
63 | 63 | return new LogListener($app['eccube.logger']); |
64 | 64 | }; |
65 | 65 | |
66 | - $app['listener.requestdump'] = function ($app) { |
|
66 | + $app['listener.requestdump'] = function($app) { |
|
67 | 67 | return new \Eccube\EventListener\RequestDumpListener($app); |
68 | 68 | }; |
69 | 69 | } |
@@ -42,13 +42,13 @@ |
||
42 | 42 | */ |
43 | 43 | public function register(Container $app) |
44 | 44 | { |
45 | - $app->extend('form.type.extensions', function ($extensions) use ($app) { |
|
45 | + $app->extend('form.type.extensions', function($extensions) use ($app) { |
|
46 | 46 | $extensions[] = new \Eccube\Form\Extension\HelpTypeExtension(); |
47 | 47 | |
48 | 48 | return $extensions; |
49 | 49 | }); |
50 | 50 | |
51 | - $app->extend('form.types', function ($types) use ($app) { |
|
51 | + $app->extend('form.types', function($types) use ($app) { |
|
52 | 52 | $types[] = new \Eccube\Form\Type\Install\Step1Type($app); |
53 | 53 | $types[] = new \Eccube\Form\Type\Install\Step3Type($app); |
54 | 54 | $types[] = new \Eccube\Form\Type\Install\Step4Type($app); |