@@ -100,14 +100,14 @@ discard block |
||
100 | 100 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
101 | 101 | $qb |
102 | 102 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
103 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
103 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | // kana |
107 | 107 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
108 | 108 | $qb |
109 | 109 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
110 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
110 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $qb |
245 | 245 | ->leftJoin('o.OrderDetails', 'od') |
246 | 246 | ->andWhere('od.product_name LIKE :buy_product_name') |
247 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
247 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
248 | 248 | } |
249 | 249 | |
250 | 250 | // Order By |
@@ -270,13 +270,13 @@ discard block |
||
270 | 270 | ->setParameter('order_id_start', $searchData['order_id_start']); |
271 | 271 | } |
272 | 272 | // multi |
273 | - if (isset( $searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
273 | + if (isset($searchData['multi']) && Str::isNotBlank($searchData['multi'])) { |
|
274 | 274 | $multi = preg_match('/^\d+$/', $searchData['multi']) ? $searchData['multi'] : null; |
275 | 275 | $qb |
276 | - ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR ' . |
|
276 | + ->andWhere('o.id = :multi OR o.name01 LIKE :likemulti OR o.name02 LIKE :likemulti OR '. |
|
277 | 277 | 'o.kana01 LIKE :likemulti OR o.kana02 LIKE :likemulti OR o.company_name LIKE :likemulti') |
278 | 278 | ->setParameter('multi', $multi) |
279 | - ->setParameter('likemulti', '%' . $searchData['multi'] . '%'); |
|
279 | + ->setParameter('likemulti', '%'.$searchData['multi'].'%'); |
|
280 | 280 | } |
281 | 281 | |
282 | 282 | // order_id_end |
@@ -313,28 +313,28 @@ discard block |
||
313 | 313 | if (isset($searchData['name']) && Str::isNotBlank($searchData['name'])) { |
314 | 314 | $qb |
315 | 315 | ->andWhere('CONCAT(o.name01, o.name02) LIKE :name') |
316 | - ->setParameter('name', '%' . $searchData['name'] . '%'); |
|
316 | + ->setParameter('name', '%'.$searchData['name'].'%'); |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | // kana |
320 | 320 | if (isset($searchData['kana']) && Str::isNotBlank($searchData['kana'])) { |
321 | 321 | $qb |
322 | 322 | ->andWhere('CONCAT(o.kana01, o.kana02) LIKE :kana') |
323 | - ->setParameter('kana', '%' . $searchData['kana'] . '%'); |
|
323 | + ->setParameter('kana', '%'.$searchData['kana'].'%'); |
|
324 | 324 | } |
325 | 325 | |
326 | 326 | |
327 | 327 | if (isset($searchData['email']) && Str::isNotBlank($searchData['email'])) { |
328 | 328 | $qb |
329 | 329 | ->andWhere('o.email like :email') |
330 | - ->setParameter('email', '%' . $searchData['email'] . '%'); |
|
330 | + ->setParameter('email', '%'.$searchData['email'].'%'); |
|
331 | 331 | } |
332 | 332 | |
333 | 333 | // tel |
334 | 334 | if (isset($searchData['tel']) && Str::isNotBlank($searchData['tel'])) { |
335 | 335 | $qb |
336 | 336 | ->andWhere('CONCAT(o.tel01, o.tel02, o.tel03) LIKE :tel') |
337 | - ->setParameter('tel', '%' . $searchData['tel'] . '%'); |
|
337 | + ->setParameter('tel', '%'.$searchData['tel'].'%'); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | // sex |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | $qb |
447 | 447 | ->leftJoin('o.OrderDetails', 'od') |
448 | 448 | ->andWhere('od.product_name LIKE :buy_product_name') |
449 | - ->setParameter('buy_product_name', '%' . $searchData['buy_product_name'] . '%'); |
|
449 | + ->setParameter('buy_product_name', '%'.$searchData['buy_product_name'].'%'); |
|
450 | 450 | } |
451 | 451 | |
452 | 452 | // Order By |
@@ -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 |
@@ -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); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | { |
33 | 33 | public function register(Container $app) |
34 | 34 | { |
35 | - $app['validator'] = function ($app) { |
|
35 | + $app['validator'] = function($app) { |
|
36 | 36 | |
37 | 37 | return new Validator( |
38 | 38 | $app['validator.mapping.class_metadata_factory'], |
@@ -43,17 +43,17 @@ discard block |
||
43 | 43 | ); |
44 | 44 | }; |
45 | 45 | |
46 | - $app['validator.mapping.class_metadata_factory'] = function ($app) { |
|
46 | + $app['validator.mapping.class_metadata_factory'] = function($app) { |
|
47 | 47 | return new ClassMetadataFactory(new StaticMethodLoader()); |
48 | 48 | }; |
49 | 49 | |
50 | - $app['validator.validator_factory'] = function () use ($app) { |
|
50 | + $app['validator.validator_factory'] = function() use ($app) { |
|
51 | 51 | $validators = isset($app['validator.validator_service_ids']) ? $app['validator.validator_service_ids'] : array(); |
52 | 52 | |
53 | 53 | return new ConstraintValidatorFactory($app, $validators); |
54 | 54 | }; |
55 | 55 | |
56 | - $app['validator.object_initializers'] = function ($app) { |
|
56 | + $app['validator.object_initializers'] = function($app) { |
|
57 | 57 | return array(); |
58 | 58 | }; |
59 | 59 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | public function register(Container $app) |
26 | 26 | { |
27 | 27 | // EventDispatcher |
28 | - $app['eccube.event.dispatcher'] = function () { |
|
28 | + $app['eccube.event.dispatcher'] = function() { |
|
29 | 29 | return new EventDispatcher(); |
30 | 30 | }; |
31 | 31 | |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $config = $pluginConfig['config']; |
37 | 37 | |
38 | 38 | if (isset($config['const'])) { |
39 | - $app->extend('config', function ($eccubeConfig) use ($config) { |
|
39 | + $app->extend('config', function($eccubeConfig) use ($config) { |
|
40 | 40 | $eccubeConfig[$config['code']] = array( |
41 | 41 | 'const' => $config['const'], |
42 | 42 | ); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | public function initPluginEventDispatcher(Application $app) |
73 | 73 | { |
74 | 74 | // hook point |
75 | - $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
75 | + $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
76 | 76 | if (!$event->isMasterRequest()) { |
77 | 77 | return; |
78 | 78 | } |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
81 | 81 | }, Application::EARLY_EVENT); |
82 | 82 | |
83 | - $app->on(KernelEvents::REQUEST, function (GetResponseEvent $event) use ($app) { |
|
83 | + $app->on(KernelEvents::REQUEST, function(GetResponseEvent $event) use ($app) { |
|
84 | 84 | if (!$event->isMasterRequest()) { |
85 | 85 | return; |
86 | 86 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
90 | 90 | }); |
91 | 91 | |
92 | - $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
92 | + $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
93 | 93 | if (!$event->isMasterRequest()) { |
94 | 94 | return; |
95 | 95 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
99 | 99 | }); |
100 | 100 | |
101 | - $app->on(KernelEvents::RESPONSE, function (FilterResponseEvent $event) use ($app) { |
|
101 | + $app->on(KernelEvents::RESPONSE, function(FilterResponseEvent $event) use ($app) { |
|
102 | 102 | if (!$event->isMasterRequest()) { |
103 | 103 | return; |
104 | 104 | } |
@@ -106,13 +106,13 @@ discard block |
||
106 | 106 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
107 | 107 | }, Application::LATE_EVENT); |
108 | 108 | |
109 | - $app->on(KernelEvents::TERMINATE, function (PostResponseEvent $event) use ($app) { |
|
109 | + $app->on(KernelEvents::TERMINATE, function(PostResponseEvent $event) use ($app) { |
|
110 | 110 | $route = $event->getRequest()->attributes->get('_route'); |
111 | 111 | $hookpoint = "eccube.event.controller.$route.finish"; |
112 | 112 | $app['eccube.event.dispatcher']->dispatch($hookpoint, $event); |
113 | 113 | }); |
114 | 114 | |
115 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
115 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
116 | 116 | if (!$event->isMasterRequest()) { |
117 | 117 | return; |
118 | 118 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | }); |
122 | 122 | |
123 | 123 | // Request Event |
124 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function (\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
124 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::REQUEST, function(\Symfony\Component\HttpKernel\Event\GetResponseEvent $event) use ($app) { |
|
125 | 125 | |
126 | 126 | if (!$event->isMasterRequest()) { |
127 | 127 | return; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | }, 30); // Routing(32)が解決し, 認証判定(8)が実行される前のタイミング. |
153 | 153 | |
154 | 154 | // Controller Event |
155 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function (\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
155 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::CONTROLLER, function(\Symfony\Component\HttpKernel\Event\FilterControllerEvent $event) use ($app) { |
|
156 | 156 | |
157 | 157 | if (!$event->isMasterRequest()) { |
158 | 158 | return; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | }); |
182 | 182 | |
183 | 183 | // Response Event |
184 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function (\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
184 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::RESPONSE, function(\Symfony\Component\HttpKernel\Event\FilterResponseEvent $event) use ($app) { |
|
185 | 185 | if (!$event->isMasterRequest()) { |
186 | 186 | return; |
187 | 187 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | }); |
211 | 211 | |
212 | 212 | // Exception Event |
213 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function (\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
213 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::EXCEPTION, function(\Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent $event) use ($app) { |
|
214 | 214 | |
215 | 215 | if (!$event->isMasterRequest()) { |
216 | 216 | return; |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | }); |
241 | 241 | |
242 | 242 | // Terminate Event |
243 | - $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function (\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
243 | + $app->on(\Symfony\Component\HttpKernel\KernelEvents::TERMINATE, function(\Symfony\Component\HttpKernel\Event\PostResponseEvent $event) use ($app) { |
|
244 | 244 | |
245 | 245 | $route = $event->getRequest()->attributes->get('_route'); |
246 | 246 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | 'label' => false, |
42 | 42 | 'class' => 'Eccube\Entity\PageLayout', |
43 | 43 | 'choice_label' => 'name', |
44 | - 'query_builder' => function (EntityRepository $er) { |
|
44 | + 'query_builder' => function(EntityRepository $er) { |
|
45 | 45 | return $er |
46 | 46 | ->createQueryBuilder('l') |
47 | 47 | ->where('l.id <> 0') |
@@ -72,19 +72,19 @@ |
||
72 | 72 | 'label' => 'SSLを強制', |
73 | 73 | 'required' => false, |
74 | 74 | )) |
75 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use($app) { |
|
75 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) use($app) { |
|
76 | 76 | $form = $event->getForm(); |
77 | 77 | $data = $form->getData(); |
78 | 78 | |
79 | 79 | $ips = preg_split("/\R/", $data['admin_allow_host'], null, PREG_SPLIT_NO_EMPTY); |
80 | 80 | |
81 | - foreach($ips as $ip) { |
|
81 | + foreach ($ips as $ip) { |
|
82 | 82 | $errors = $app['validator']->validate($ip, array( |
83 | 83 | new Assert\Ip(), |
84 | 84 | ) |
85 | 85 | ); |
86 | 86 | if ($errors->count() != 0) { |
87 | - $form['admin_allow_host']->addError(new FormError($ip . 'はIPv4アドレスではありません。')); |
|
87 | + $form['admin_allow_host']->addError(new FormError($ip.'はIPv4アドレスではありません。')); |
|
88 | 88 | } |
89 | 89 | } |
90 | 90 | }) |