@@ -33,7 +33,7 @@ |
||
33 | 33 | { |
34 | 34 | protected $config; |
35 | 35 | |
36 | - public function __construct ($config) |
|
36 | + public function __construct($config) |
|
37 | 37 | { |
38 | 38 | $this->config = $config; |
39 | 39 | } |
@@ -142,19 +142,19 @@ |
||
142 | 142 | 'help' => 'メーラーバックエンドがSMTPかつSMTP-AUTH使用時のみ指定', |
143 | 143 | 'required' => false, |
144 | 144 | )) |
145 | - ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use($app) { |
|
145 | + ->addEventListener(FormEvents::POST_SUBMIT, function($event) use($app) { |
|
146 | 146 | $form = $event->getForm(); |
147 | 147 | $data = $form->getData(); |
148 | 148 | |
149 | 149 | $ips = preg_split("/\R/", $data['admin_allow_hosts'], null, PREG_SPLIT_NO_EMPTY); |
150 | 150 | |
151 | - foreach($ips as $ip) { |
|
151 | + foreach ($ips as $ip) { |
|
152 | 152 | $errors = $app['validator']->validateValue($ip, array( |
153 | 153 | new Assert\Ip(), |
154 | 154 | ) |
155 | 155 | ); |
156 | 156 | if ($errors->count() != 0) { |
157 | - $form['admin_allow_hosts']->addError(new FormError($ip . 'はIPv4アドレスではありません。')); |
|
157 | + $form['admin_allow_hosts']->addError(new FormError($ip.'はIPv4アドレスではありません。')); |
|
158 | 158 | } |
159 | 159 | } |
160 | 160 | }) |
@@ -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_list']->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_list']->getValues(); |
51 | 51 | if (!in_array($event->getData(), $values)) { |
@@ -41,7 +41,7 @@ |
||
41 | 41 | 'expanded' => false, |
42 | 42 | 'required' => false, |
43 | 43 | 'empty_value' => false, |
44 | - 'query_builder' => function (EntityRepository $er) { |
|
44 | + 'query_builder' => function(EntityRepository $er) { |
|
45 | 45 | return $er->createQueryBuilder('m') |
46 | 46 | ->orderBy('m.rank', 'ASC'); |
47 | 47 | }, |
@@ -62,10 +62,10 @@ |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | if (empty($options['lastname_name'])) { |
65 | - $options['lastname_name'] = $builder->getName() . '01'; |
|
65 | + $options['lastname_name'] = $builder->getName().'01'; |
|
66 | 66 | } |
67 | 67 | if (empty($options['firstname_name'])) { |
68 | - $options['firstname_name'] = $builder->getName() . '02'; |
|
68 | + $options['firstname_name'] = $builder->getName().'02'; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | $builder |
@@ -47,7 +47,7 @@ |
||
47 | 47 | new Assert\GreaterThanOrEqual(array('value' => 0)), |
48 | 48 | ); |
49 | 49 | |
50 | - $constraints = function (Options $options) use ($defaultValues) { |
|
50 | + $constraints = function(Options $options) use ($defaultValues) { |
|
51 | 51 | if (false !== $options['required']) { |
52 | 52 | return array_merge($defaultValues, array(new Assert\NotBlank())); |
53 | 53 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $app = $this->app; |
49 | 49 | |
50 | 50 | $builder |
51 | - ->addEventListener(FormEvents::PRE_SET_DATA, function ($event) use ($app) { |
|
51 | + ->addEventListener(FormEvents::PRE_SET_DATA, function($event) use ($app) { |
|
52 | 52 | /** @var \Eccube\Entity\Shipping $data */ |
53 | 53 | $data = $event->getData(); |
54 | 54 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | 'empty_data' => null, |
96 | 96 | )); |
97 | 97 | }) |
98 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
98 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
99 | 99 | /** @var \Eccube\Entity\Shipping $data */ |
100 | 100 | $data = $event->getData(); |
101 | 101 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | }) |
114 | - ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
114 | + ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
115 | 115 | /** @var \Eccube\Entity\Shipping $data */ |
116 | 116 | $data = $event->getData(); |
117 | 117 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | new Assert\Regex(array('pattern' => '/^\d+$/')), |
64 | 64 | ), |
65 | 65 | )) |
66 | - ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($app) { |
|
66 | + ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($app) { |
|
67 | 67 | $form = $event->getForm(); |
68 | 68 | |
69 | 69 | if ($app->isGranted('IS_AUTHENTICATED_FULLY')) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $form->add('customer_address', 'entity', array( |
73 | 73 | 'class' => 'Eccube\Entity\CustomerAddress', |
74 | 74 | 'property' => 'shippingMultipleDefaultName', |
75 | - 'query_builder' => function (EntityRepository $er) use ($Customer) { |
|
75 | + 'query_builder' => function(EntityRepository $er) use ($Customer) { |
|
76 | 76 | return $er->createQueryBuilder('ca') |
77 | 77 | ->where('ca.Customer = :Customer') |
78 | 78 | ->orderBy("ca.id", "ASC") |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | } |
105 | 105 | } |
106 | 106 | }) |
107 | - ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) { |
|
107 | + ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) { |
|
108 | 108 | /** @var \Eccube\Entity\Shipping $data */ |
109 | 109 | $data = $event->getData(); |
110 | 110 | /** @var \Symfony\Component\Form\Form $form */ |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $app = $this->app; |
48 | 48 | |
49 | 49 | $builder |
50 | - ->addEventListener(FormEvents::POST_SET_DATA, function ($event) use ($app) { |
|
50 | + ->addEventListener(FormEvents::POST_SET_DATA, function($event) use ($app) { |
|
51 | 51 | /** @var \Eccube\Entity\ShipmentItem $data */ |
52 | 52 | $data = $event->getData(); |
53 | 53 | /** @var \Symfony\Component\Form\Form $form */ |