Completed
Pull Request — experimental/3.1 (#1985)
by Kentaro
98:19 queued 35:24
created
src/Eccube/Form/Type/Admin/PageLayoutType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
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')
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/SecurityType.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,8 +57,8 @@
 block discarded – undo
57 57
                     new Assert\NotBlank(),
58 58
                     new Assert\Length(array('max' => $this->config['stext_len'])),
59 59
                     new Assert\Regex(array(
60
-                       'pattern' => "/^[0-9a-zA-Z]+$/",
61
-                   )),
60
+                        'pattern' => "/^[0-9a-zA-Z]+$/",
61
+                    )),
62 62
                 ),
63 63
             ))
64 64
             ->add('admin_allow_host', TextareaType::class, array(
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,19 +72,19 @@
 block discarded – undo
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
             })
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Admin/OrderDetailType.php 1 patch
Spacing   +5 added lines, -9 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
                 )));
115 115
 
116 116
         $app = $this->app;
117
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) use ($app) {
117
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) use ($app) {
118 118
             // モーダルからのPOST時に、金額等をセットする.
119 119
             if ('modal' === $app['request_stack']->getCurrentRequest()->get('modal')) {
120 120
                 $data = $event->getData();
@@ -131,17 +131,13 @@  discard block
 block discarded – undo
131 131
                     $data['product_name'] = $Product->getName();
132 132
                     $data['product_code'] = $ProductClass->getCode();
133 133
                     $data['class_name1'] = $ProductClass->hasClassCategory1() ?
134
-                        $ProductClass->getClassCategory1()->getClassName() :
135
-                        null;
134
+                        $ProductClass->getClassCategory1()->getClassName() : null;
136 135
                     $data['class_name2'] = $ProductClass->hasClassCategory2() ?
137
-                        $ProductClass->getClassCategory2()->getClassName() :
138
-                        null;
136
+                        $ProductClass->getClassCategory2()->getClassName() : null;
139 137
                     $data['class_category_name1'] = $ProductClass->hasClassCategory1() ?
140
-                        $ProductClass->getClassCategory1()->getName() :
141
-                        null;
138
+                        $ProductClass->getClassCategory1()->getName() : null;
142 139
                     $data['class_category_name2'] = $ProductClass->hasClassCategory2() ?
143
-                        $ProductClass->getClassCategory2()->getName() :
144
-                        null;
140
+                        $ProductClass->getClassCategory2()->getName() : null;
145 141
                     $data['tax_rule'] = $TaxRule->getCalcRule()->getId();
146 142
                     $data['price'] = $ProductClass->getPrice02();
147 143
                     $data['quantity'] = empty($data['quantity']) ? 1 : $data['quantity'];
Please login to merge, or discard this patch.
src/Eccube/Form/Type/ShippingItemType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $app = $this->app;
50 50
 
51 51
         $builder
52
-            ->addEventListener(FormEvents::PRE_SET_DATA, function ($event) use ($app) {
52
+            ->addEventListener(FormEvents::PRE_SET_DATA, function($event) use ($app) {
53 53
                 /** @var \Eccube\Entity\Shipping $data */
54 54
                 $data = $event->getData();
55 55
                 /** @var \Symfony\Component\Form\Form $form */
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                         'placeholder' => '指定なし',
103 103
                     ));
104 104
             })
105
-            ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) {
105
+            ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) {
106 106
                 /** @var \Eccube\Entity\Shipping $data */
107 107
                 $data = $event->getData();
108 108
                 /** @var \Symfony\Component\Form\Form $form */
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
                 }
119 119
 
120 120
             })
121
-            ->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) {
121
+            ->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) {
122 122
                 /** @var \Eccube\Entity\Shipping $data */
123 123
                 $data = $event->getData();
124 124
                 /** @var \Symfony\Component\Form\Form $form */
Please login to merge, or discard this patch.
src/Eccube/Form/Type/MasterType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
             'expanded' => false,
43 43
             'required' => false,
44 44
             'placeholder' => '選択してください',
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
             },
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Master/ProductListMaxType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,14 +39,14 @@
 block discarded – undo
39 39
     public function buildForm(FormBuilderInterface $builder, array $options)
40 40
     {
41 41
         // FIXME $options['choice_list']->getValues() が動作しない
42
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
42
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) {
43 43
             $options = $event->getForm()->getConfig()->getOptions();
44 44
             if (!$event->getData()) {
45 45
                 $data = current(array_keys($options['choice_loader']->loadChoiceList()->getValues()));
46 46
                 $event->setData($data);
47 47
             }
48 48
         });
49
-        $builder->addEventListener(FormEvents::PRE_SUBMIT, function (FormEvent $event) {
49
+        $builder->addEventListener(FormEvents::PRE_SUBMIT, function(FormEvent $event) {
50 50
             $options = $event->getForm()->getConfig()->getOptions();
51 51
             $values = $options['choice_loader']->loadChoiceList()->getValues();
52 52
             if (!in_array($event->getData(), $values)) {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/TelType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
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() != '') {
Please login to merge, or discard this patch.
src/Eccube/Form/Type/ShippingMultipleItemType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
                     new Assert\Regex(array('pattern' => '/^\d+$/')),
66 66
                 ),
67 67
             ))
68
-            ->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($app) {
68
+            ->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($app) {
69 69
                 $form = $event->getForm();
70 70
 
71 71
                 if ($app->isGranted('IS_AUTHENTICATED_FULLY')) {
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                     $form->add('customer_address', 'entity', array(
75 75
                         'class' => 'Eccube\Entity\CustomerAddress',
76 76
                         'choice_label' => 'shippingMultipleDefaultName',
77
-                        'query_builder' => function (EntityRepository $er) use ($Customer) {
77
+                        'query_builder' => function(EntityRepository $er) use ($Customer) {
78 78
                             return $er->createQueryBuilder('ca')
79 79
                                 ->where('ca.Customer = :Customer')
80 80
                                 ->orderBy("ca.id", "ASC")
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                     }
107 107
                 }
108 108
             })
109
-            ->addEventListener(FormEvents::POST_SET_DATA, function (FormEvent $event) {
109
+            ->addEventListener(FormEvents::POST_SET_DATA, function(FormEvent $event) {
110 110
                 /** @var \Eccube\Entity\Shipping $data */
111 111
                 $data = $event->getData();
112 112
                 /** @var \Symfony\Component\Form\Form $form */
Please login to merge, or discard this patch.
src/Eccube/Form/Type/Install/Step3Type.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -147,19 +147,19 @@
 block discarded – undo
147 147
                 'help' => 'メーラーバックエンドがSMTPかつSMTP-AUTH使用時のみ指定',
148 148
                 'required' => false,
149 149
             ))
150
-            ->addEventListener(FormEvents::POST_SUBMIT, function ($event) use($app)  {
150
+            ->addEventListener(FormEvents::POST_SUBMIT, function($event) use($app)  {
151 151
                 $form = $event->getForm();
152 152
                 $data = $form->getData();
153 153
 
154 154
                 $ips = preg_split("/\R/", $data['admin_allow_hosts'], null, PREG_SPLIT_NO_EMPTY);
155 155
 
156
-                foreach($ips as $ip) {
156
+                foreach ($ips as $ip) {
157 157
                     $errors = $app['validator']->validate($ip, array(
158 158
                             new Assert\Ip(),
159 159
                         )
160 160
                     );
161 161
                     if ($errors->count() != 0) {
162
-                        $form['admin_allow_hosts']->addError(new FormError($ip . 'はIPv4アドレスではありません。'));
162
+                        $form['admin_allow_hosts']->addError(new FormError($ip.'はIPv4アドレスではありません。'));
163 163
                     }
164 164
                 }
165 165
             })
Please login to merge, or discard this patch.