@@ -79,7 +79,7 @@ |
||
79 | 79 | $builder->setAttribute('tel02_name', $options['tel02_name']); |
80 | 80 | $builder->setAttribute('tel03_name', $options['tel03_name']); |
81 | 81 | // todo 変 |
82 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function ($event) use ($builder) { |
|
82 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function($event) use ($builder) { |
|
83 | 83 | $form = $event->getForm(); |
84 | 84 | $count = 0; |
85 | 85 | if ($form[$builder->getName().'01']->getData() != '') { |
@@ -59,7 +59,6 @@ |
||
59 | 59 | { |
60 | 60 | } |
61 | 61 | /** |
62 | - |
|
63 | 62 | * {@inheritdoc} |
64 | 63 | */ |
65 | 64 | public function buildForm(FormBuilderInterface $builder, array $options) |
@@ -25,7 +25,7 @@ |
||
25 | 25 | $app['db.migrations.table_name'] = null; |
26 | 26 | $app['db.migrations.name'] = null; |
27 | 27 | |
28 | - $app['dispatcher']->addListener(ConsoleEvents::INIT, function (ConsoleEvent $event) use ($app) { |
|
28 | + $app['dispatcher']->addListener(ConsoleEvents::INIT, function(ConsoleEvent $event) use ($app) { |
|
29 | 29 | $application = $event->getApplication(); |
30 | 30 | |
31 | 31 | if (isset($app['orm.em'])) { |
@@ -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 */ |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
43 | 43 | if (!$event->getData()) { |
44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
45 | 45 | $event->setData($data); |
46 | 46 | } |
47 | 47 | }); |
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -38,21 +38,21 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
42 | - $options = $event->getForm()->getConfig()->getOptions(); |
|
43 | - if (!$event->getData()) { |
|
44 | - $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
|
45 | - $event->setData($data); |
|
46 | - } |
|
47 | - }); |
|
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
49 | - $options = $event->getForm()->getConfig()->getOptions(); |
|
50 | - $values = $options['choice_loader']->loadChoiceList()->getValues(); |
|
51 | - if (!in_array($event->getData(), $values)) { |
|
52 | - $data = current($values); |
|
53 | - $event->setData($data); |
|
54 | - } |
|
55 | - }); |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
42 | + $options = $event->getForm()->getConfig()->getOptions(); |
|
43 | + if (!$event->getData()) { |
|
44 | + $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
|
45 | + $event->setData($data); |
|
46 | + } |
|
47 | + }); |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
49 | + $options = $event->getForm()->getConfig()->getOptions(); |
|
50 | + $values = $options['choice_loader']->loadChoiceList()->getValues(); |
|
51 | + if (!in_array($event->getData(), $values)) { |
|
52 | + $data = current($values); |
|
53 | + $event->setData($data); |
|
54 | + } |
|
55 | + }); |
|
56 | 56 | } |
57 | 57 | |
58 | 58 | /** |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
43 | 43 | if (!$event->getData()) { |
44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
45 | 45 | $event->setData($data); |
46 | 46 | } |
47 | 47 | }); |
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -42,7 +42,7 @@ |
||
42 | 42 | 'expanded' => false, |
43 | 43 | 'required' => false, |
44 | 44 | 'placeholder' => false, |
45 | - 'query_builder' => function (EntityRepository $er) { |
|
45 | + 'query_builder' => function(EntityRepository $er) { |
|
46 | 46 | return $er->createQueryBuilder('m') |
47 | 47 | ->orderBy('m.rank', 'ASC'); |
48 | 48 | }, |
@@ -38,14 +38,14 @@ |
||
38 | 38 | */ |
39 | 39 | public function buildForm(FormBuilderInterface $builder, array $options) |
40 | 40 | { |
41 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
41 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
42 | 42 | $options = $event->getForm()->getConfig()->getOptions(); |
43 | 43 | if (!$event->getData()) { |
44 | 44 | $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues())); |
45 | 45 | $event->setData($data); |
46 | 46 | } |
47 | 47 | }); |
48 | - $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) { |
|
48 | + $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) { |
|
49 | 49 | $options = $event->getForm()->getConfig()->getOptions(); |
50 | 50 | $values = $options['choice_loader']->loadChoiceList()->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | public function setRequireHttps($requireHttps) |
16 | 16 | { |
17 | - $this->requireHttps = (bool)$requireHttps; |
|
17 | + $this->requireHttps = (bool) $requireHttps; |
|
18 | 18 | } |
19 | 19 | |
20 | 20 | public function setAdminPrefix($adminPrefix) |
@@ -24,18 +24,15 @@ |
||
24 | 24 | |
25 | 25 | namespace Eccube\ServiceProvider; |
26 | 26 | |
27 | -use Eccube\Common\Constant; |
|
28 | 27 | use Eccube\DataCollector\EccubeDataCollector; |
29 | 28 | use Pimple\Container; |
30 | 29 | use Pimple\ServiceProviderInterface; |
31 | 30 | use Silex\Api\BootableProviderInterface; |
32 | 31 | use Silex\Application; |
33 | 32 | use Symfony\Bridge\Twig\Extension\DumpExtension; |
34 | -use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
35 | 33 | use Symfony\Component\HttpKernel\DataCollector\DumpDataCollector; |
36 | 34 | use Symfony\Component\HttpKernel\EventListener\DumpListener; |
37 | 35 | use Symfony\Component\VarDumper\Cloner\VarCloner; |
38 | -use Symfony\Component\VarDumper\Dumper\CliDumper; |
|
39 | 36 | use Symfony\Component\VarDumper\Dumper\HtmlDumper; |
40 | 37 | use Symfony\Component\VarDumper\VarDumper; |
41 | 38 |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | { |
73 | 73 | public function register(Container $app) |
74 | 74 | { |
75 | - $app['var_dumper.cloner'] = function ($app) { |
|
75 | + $app['var_dumper.cloner'] = function($app) { |
|
76 | 76 | $cloner = new VarCloner(); |
77 | 77 | |
78 | 78 | if (isset($app['debug.max_items'])) { |
@@ -86,37 +86,37 @@ discard block |
||
86 | 86 | return $cloner; |
87 | 87 | }; |
88 | 88 | |
89 | - $app->extend('data_collector.templates', function ($templates) { |
|
89 | + $app->extend('data_collector.templates', function($templates) { |
|
90 | 90 | return array_merge($templates, array(array('dump', '@Debug/Profiler/dump.html.twig'))); |
91 | 91 | }); |
92 | 92 | |
93 | - $app['data_collector.dump'] = function ($app) { |
|
93 | + $app['data_collector.dump'] = function($app) { |
|
94 | 94 | return new DumpDataCollector($app['stopwatch'], $app['code.file_link_format'], null, null, new HtmlDumper()); |
95 | 95 | }; |
96 | 96 | |
97 | - $app->extend('data_collectors', function ($collectors, $app) { |
|
98 | - $collectors['dump'] = function ($app) { |
|
97 | + $app->extend('data_collectors', function($collectors, $app) { |
|
98 | + $collectors['dump'] = function($app) { |
|
99 | 99 | return $app['data_collector.dump']; |
100 | 100 | }; |
101 | 101 | |
102 | - $collectors['eccube'] = function ($app) { |
|
102 | + $collectors['eccube'] = function($app) { |
|
103 | 103 | return new EccubeDataCollector($app); |
104 | 104 | }; |
105 | 105 | return $collectors; |
106 | 106 | }); |
107 | 107 | |
108 | - $app->extend('data_collector.templates', function ($templates, $app) { |
|
108 | + $app->extend('data_collector.templates', function($templates, $app) { |
|
109 | 109 | array_unshift($templates, ['eccube', '@EccubeProfiler/eccube.html.twig']); |
110 | 110 | return $templates; |
111 | 111 | } |
112 | 112 | ); |
113 | 113 | |
114 | - $app->extend('twig.loader.filesystem', function ($filesystem, $app) { |
|
114 | + $app->extend('twig.loader.filesystem', function($filesystem, $app) { |
|
115 | 115 | return $filesystem; |
116 | 116 | } |
117 | 117 | ); |
118 | 118 | |
119 | - $app->extend('twig', function ($twig, $app) { |
|
119 | + $app->extend('twig', function($twig, $app) { |
|
120 | 120 | if (class_exists('\Symfony\Bridge\Twig\Extension\DumpExtension')) { |
121 | 121 | $twig->addExtension(new DumpExtension($app['var_dumper.cloner'])); |
122 | 122 | } |
@@ -124,14 +124,14 @@ discard block |
||
124 | 124 | return $twig; |
125 | 125 | }); |
126 | 126 | |
127 | - $app->extend('twig.loader.filesystem', function ($loader, $app) { |
|
127 | + $app->extend('twig.loader.filesystem', function($loader, $app) { |
|
128 | 128 | $loader->addPath($app['debug.templates_path'], 'Debug'); |
129 | 129 | $loader->addPath(__DIR__.'/../Resource/template/toolbar', 'EccubeProfiler'); |
130 | 130 | |
131 | 131 | return $loader; |
132 | 132 | }); |
133 | 133 | |
134 | - $app['debug.templates_path'] = function () { |
|
134 | + $app['debug.templates_path'] = function() { |
|
135 | 135 | $r = new \ReflectionClass('Symfony\Bundle\DebugBundle\DependencyInjection\Configuration'); |
136 | 136 | |
137 | 137 | return dirname(dirname($r->getFileName())).'/Resources/views'; |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | // This code is here to lazy load the dump stack. This default |
144 | 144 | // configuration for CLI mode is overridden in HTTP mode on |
145 | 145 | // 'kernel.request' event |
146 | - VarDumper::setHandler(function ($var) use ($app) { |
|
146 | + VarDumper::setHandler(function($var) use ($app) { |
|
147 | 147 | $dumper = $app['data_collector.dump']; |
148 | 148 | $cloner = $app['var_dumper.cloner']; |
149 | 149 | |
150 | - $handler = function ($var) use ($dumper, $cloner) { |
|
150 | + $handler = function($var) use ($dumper, $cloner) { |
|
151 | 151 | $dumper->dump($cloner->cloneVar($var)); |
152 | 152 | }; |
153 | 153 |