@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | 'format' => 'yyyy-MM-dd', |
150 | 150 | 'required' => false, |
151 | 151 | )) |
152 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($BaseInfo) { |
|
152 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($BaseInfo) { |
|
153 | 153 | if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
154 | 154 | $form = $event->getForm(); |
155 | 155 | $form->add('ShipmentItems', CollectionType::class, array( |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | )); |
161 | 161 | } |
162 | 162 | }) |
163 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
163 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
164 | 164 | /** @var \Eccube\Entity\Shipping $data */ |
165 | 165 | $data = $event->getData(); |
166 | 166 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | 'choice_label' => 'delivery_time', |
180 | 180 | 'placeholder' => '指定なし', |
181 | 181 | 'required' => false, |
182 | - 'query_builder' => function (EntityRepository $er) use($Delivery) { |
|
182 | + 'query_builder' => function(EntityRepository $er) use($Delivery) { |
|
183 | 183 | return $er->createQueryBuilder('dt') |
184 | 184 | ->where('dt.Delivery = :Delivery') |
185 | 185 | ->setParameter('Delivery', $Delivery); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | )); |
188 | 188 | |
189 | 189 | }) |
190 | - ->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
190 | + ->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
191 | 191 | $data = $event->getData(); |
192 | 192 | $form = $event->getForm(); |
193 | 193 | if (!$data) { |
@@ -207,14 +207,14 @@ discard block |
||
207 | 207 | 'choice_label' => 'delivery_time', |
208 | 208 | 'placeholder' => '指定なし', |
209 | 209 | 'required' => false, |
210 | - 'query_builder' => function (EntityRepository $er) use($Delivery) { |
|
210 | + 'query_builder' => function(EntityRepository $er) use($Delivery) { |
|
211 | 211 | return $er->createQueryBuilder('dt') |
212 | 212 | ->where('dt.Delivery = :Delivery') |
213 | 213 | ->setParameter('Delivery', $Delivery); |
214 | 214 | }, |
215 | 215 | )); |
216 | 216 | }) |
217 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
217 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
218 | 218 | if ($BaseInfo->getOptionMultipleShipping() == Constant::ENABLED) { |
219 | 219 | $form = $event->getForm(); |
220 | 220 | $shipmentItems = $form['ShipmentItems']->getData(); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | } |
226 | 226 | } |
227 | 227 | }) |
228 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) use ($BaseInfo) { |
|
228 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) use ($BaseInfo) { |
|
229 | 229 | $Shipping = $event->getData(); |
230 | 230 | $Delivery = $Shipping->getDelivery(); |
231 | 231 | $Shipping->setShippingDeliveryName($Delivery ? $Delivery : null); |
@@ -2,14 +2,9 @@ |
||
2 | 2 | namespace Eccube2\Controller; |
3 | 3 | |
4 | 4 | use Eccube\Application; |
5 | -use Symfony\Component\HttpFoundation\Response; |
|
6 | 5 | use Symfony\Component\HttpFoundation\Request; |
7 | -use Symfony\Component\HttpFoundation\ParameterBag; |
|
8 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
9 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
|
10 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; |
|
11 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
12 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
|
13 | 8 | |
14 | 9 | /** |
15 | 10 | * @Route("/test") |
@@ -43,9 +43,7 @@ |
||
43 | 43 | use Symfony\Component\Validator\Constraints as Assert; |
44 | 44 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
45 | 45 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; |
46 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security; |
|
47 | 46 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
48 | -use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
|
49 | 47 | |
50 | 48 | /** |
51 | 49 | * @Route("/shopping") |
@@ -1336,7 +1336,7 @@ |
||
1336 | 1336 | // ステータス履歴も保持しておく? 在庫引き当ての仕様もセットで。 |
1337 | 1337 | if ($dispatcher instanceof Response |
1338 | 1338 | && ($dispatcher->isRedirection() || $dispatcher->getContent())) { // $paymentMethod->apply() が Response を返した場合は画面遷移 |
1339 | - return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御? |
|
1339 | + return $dispatcher; // 画面遷移したいパターンが複数ある場合はどうする? 引数で制御? |
|
1340 | 1340 | } |
1341 | 1341 | $PaymentResult = $paymentService->doCheckout($paymentMethod); // 決済実行 |
1342 | 1342 | if (!$PaymentResult->isSuccess()) { |
@@ -24,12 +24,10 @@ |
||
24 | 24 | |
25 | 25 | namespace Eccube\ServiceProvider; |
26 | 26 | |
27 | -use Eccube\Common\Constant; |
|
28 | 27 | use Eccube\DataCollector\EccubeDataCollector; |
29 | 28 | use Silex\Application; |
30 | 29 | use Silex\Api\BootableProviderInterface; |
31 | 30 | use Symfony\Bridge\Twig\Extension\DumpExtension; |
32 | -use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
33 | 31 | use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; |
34 | 32 | use Symfony\Component\HttpKernel\EventListener\DumpListener; |
35 | 33 | use Symfony\Component\VarDumper\Cloner\VarCloner; |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | public function register(Container $app) |
73 | 73 | { |
74 | - $app['var_dumper.cloner'] = function ($app) { |
|
74 | + $app['var_dumper.cloner'] = function($app) { |
|
75 | 75 | $cloner = new VarCloner(); |
76 | 76 | |
77 | 77 | if (isset($app['debug.max_items'])) { |
@@ -85,37 +85,37 @@ discard block |
||
85 | 85 | return $cloner; |
86 | 86 | }; |
87 | 87 | |
88 | - $app->extend('data_collector.templates', function ($templates) { |
|
88 | + $app->extend('data_collector.templates', function($templates) { |
|
89 | 89 | return array_merge($templates, array(array('dump', '@Debug/Profiler/dump.html.twig'))); |
90 | 90 | }); |
91 | 91 | |
92 | - $app['data_collector.dump'] = function ($app) { |
|
92 | + $app['data_collector.dump'] = function($app) { |
|
93 | 93 | return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format']); |
94 | 94 | }; |
95 | 95 | |
96 | - $app->extend('data_collectors', function ($collectors, $app) { |
|
97 | - $collectors['dump'] = function ($app) { |
|
96 | + $app->extend('data_collectors', function($collectors, $app) { |
|
97 | + $collectors['dump'] = function($app) { |
|
98 | 98 | return $app['data_collector.dump']; |
99 | 99 | }; |
100 | 100 | |
101 | - $collectors['eccube'] = function ($app) { |
|
101 | + $collectors['eccube'] = function($app) { |
|
102 | 102 | return new EccubeDataCollector($app); |
103 | 103 | }; |
104 | 104 | return $collectors; |
105 | 105 | }); |
106 | 106 | |
107 | - $app->extend('data_collector.templates', function ($templates, $app) { |
|
107 | + $app->extend('data_collector.templates', function($templates, $app) { |
|
108 | 108 | array_unshift($templates, ['eccube', '@EccubeProfiler/eccube.html.twig']); |
109 | 109 | return $templates; |
110 | 110 | } |
111 | 111 | ); |
112 | 112 | |
113 | - $app->extend('twig.loader.filesystem', function ($filesystem, $app) { |
|
113 | + $app->extend('twig.loader.filesystem', function($filesystem, $app) { |
|
114 | 114 | return $filesystem; |
115 | 115 | } |
116 | 116 | ); |
117 | 117 | |
118 | - $app->extend('twig', function ($twig, $app) { |
|
118 | + $app->extend('twig', function($twig, $app) { |
|
119 | 119 | if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) { |
120 | 120 | $twig->addExtension(new DumpExtension($app['var_dumper.cloner'])); |
121 | 121 | } |
@@ -123,14 +123,14 @@ discard block |
||
123 | 123 | return $twig; |
124 | 124 | }); |
125 | 125 | |
126 | - $app->extend('twig.loader.filesystem', function ($loader, $app) { |
|
126 | + $app->extend('twig.loader.filesystem', function($loader, $app) { |
|
127 | 127 | $loader->addPath($app['debug.templates_path'], 'Debug'); |
128 | 128 | $loader->addPath(__DIR__.'/../Resource/template/toolbar', 'EccubeProfiler'); |
129 | 129 | |
130 | 130 | return $loader; |
131 | 131 | }); |
132 | 132 | |
133 | - $app['debug.templates_path'] = function () { |
|
133 | + $app['debug.templates_path'] = function() { |
|
134 | 134 | $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration'); |
135 | 135 | |
136 | 136 | return dirname(dirname($r->getFileName())).'/Resources/views'; |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | // This code is here to lazy load the dump stack. This default |
143 | 143 | // configuration for CLI mode is overridden in HTTP mode on |
144 | 144 | // 'kernel.request' event |
145 | - VarDumper::setHandler(function ($var) use ($app) { |
|
145 | + VarDumper::setHandler(function($var) use ($app) { |
|
146 | 146 | $dumper = new CliDumper(); |
147 | 147 | $dumper->dump($app['var_dumper.cloner']->cloneVar($var)); |
148 | 148 | }); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | return $phpinfo; |
43 | 43 | |
44 | - break; |
|
44 | + break; |
|
45 | 45 | default: |
46 | 46 | break; |
47 | 47 | } |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | )); |
54 | 54 | } |
55 | 55 | |
56 | - public function getSystemInfo(Application $app, Request $request) |
|
57 | - { |
|
56 | + public function getSystemInfo(Application $app, Request $request) |
|
57 | + { |
|
58 | 58 | $system = $app['eccube.service.system']; |
59 | 59 | |
60 | 60 | $arrSystemInfo = array( |
@@ -69,5 +69,5 @@ discard block |
||
69 | 69 | $arrSystemInfo[] = array('title' => 'HTTPユーザーエージェント', 'value' => $request->headers->get('User-Agent')); |
70 | 70 | |
71 | 71 | return $arrSystemInfo; |
72 | - } |
|
72 | + } |
|
73 | 73 | } |
@@ -58,13 +58,13 @@ |
||
58 | 58 | $system = $app['eccube.service.system']; |
59 | 59 | |
60 | 60 | $arrSystemInfo = array( |
61 | - array('title' => 'EC-CUBE', 'value' => Constant::VERSION), |
|
62 | - array('title' => 'サーバーOS', 'value' => php_uname()), |
|
63 | - array('title' => 'DBサーバー', 'value' => $system->getDbversion()), |
|
64 | - array('title' => 'WEBサーバー', 'value' => $request->server->get("SERVER_SOFTWARE")), |
|
61 | + array('title' => 'EC-CUBE', 'value' => Constant::VERSION), |
|
62 | + array('title' => 'サーバーOS', 'value' => php_uname()), |
|
63 | + array('title' => 'DBサーバー', 'value' => $system->getDbversion()), |
|
64 | + array('title' => 'WEBサーバー', 'value' => $request->server->get("SERVER_SOFTWARE")), |
|
65 | 65 | ); |
66 | 66 | |
67 | - $value = phpversion() . ' (' . implode(', ', get_loaded_extensions()) . ')'; |
|
67 | + $value = phpversion().' ('.implode(', ', get_loaded_extensions()).')'; |
|
68 | 68 | $arrSystemInfo[] = array('title' => 'PHP', 'value' => $value); |
69 | 69 | $arrSystemInfo[] = array('title' => 'HTTPユーザーエージェント', 'value' => $request->headers->get('User-Agent')); |
70 | 70 |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | ))); |
97 | 97 | |
98 | 98 | $app = $this->app; |
99 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) { |
|
99 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) { |
|
100 | 100 | // モーダルからのPOST時に、金額等をセットする. |
101 | 101 | if ('modal' === $app['request_stack']->getCurrentRequest()->get('modal')) { |
102 | 102 | $data = $event->getData(); |
@@ -111,17 +111,13 @@ discard block |
||
111 | 111 | $data['product_name'] = $Product->getName(); |
112 | 112 | $data['product_code'] = $ProductClass->getCode(); |
113 | 113 | $data['class_name1'] = $ProductClass->hasClassCategory1() ? |
114 | - $ProductClass->getClassCategory1()->getClassName() : |
|
115 | - null; |
|
114 | + $ProductClass->getClassCategory1()->getClassName() : null; |
|
116 | 115 | $data['class_name2'] = $ProductClass->hasClassCategory2() ? |
117 | - $ProductClass->getClassCategory2()->getClassName() : |
|
118 | - null; |
|
116 | + $ProductClass->getClassCategory2()->getClassName() : null; |
|
119 | 117 | $data['class_category_name1'] = $ProductClass->hasClassCategory1() ? |
120 | - $ProductClass->getClassCategory1()->getName() : |
|
121 | - null; |
|
118 | + $ProductClass->getClassCategory1()->getName() : null; |
|
122 | 119 | $data['class_category_name2'] = $ProductClass->hasClassCategory2() ? |
123 | - $ProductClass->getClassCategory2()->getName() : |
|
124 | - null; |
|
120 | + $ProductClass->getClassCategory2()->getName() : null; |
|
125 | 121 | $data['price'] = $ProductClass->getPrice02(); |
126 | 122 | $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity']; |
127 | 123 | $event->setData($data); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | new Assert\Regex(array('pattern' => '/^\d+$/')), |
67 | 67 | ), |
68 | 68 | )) |
69 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($app) { |
|
69 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($app) { |
|
70 | 70 | $form = $event->getForm(); |
71 | 71 | |
72 | 72 | if ($app->isGranted('IS_AUTHENTICATED_FULLY')) { |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $form->add('customer_address', EntityType::class, array( |
76 | 76 | 'class' => 'Eccube\Entity\CustomerAddress', |
77 | 77 | 'choice_label' => 'shippingMultipleDefaultName', |
78 | - 'query_builder' => function (EntityRepository $er) use ($Customer) { |
|
78 | + 'query_builder' => function(EntityRepository $er) use ($Customer) { |
|
79 | 79 | return $er->createQueryBuilder('ca') |
80 | 80 | ->where('ca.Customer = :Customer') |
81 | 81 | ->orderBy("ca.id", "ASC") |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | } |
109 | 109 | }) |
110 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
110 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
111 | 111 | /** @var \Eccube\Entity\Shipping $data */ |
112 | 112 | $data = $event->getData(); |
113 | 113 | /** @var \Symfony\Component\Form\Form $form */ |