Passed
Push — master ( d20051...6a40f0 )
by Jan
04:35
created
src/Controller/AdminPages/BaseAdminController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
             $table = null;
166 166
         }
167 167
 
168
-        $form_options =  [
168
+        $form_options = [
169 169
             'attachment_class' => $this->attachment_class,
170 170
             'parameter_class' => $this->parameter_class,
171 171
             'disabled' => null !== $timeTravel_timestamp ? true : false,
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         $form->handleRequest($request);
186 186
         if ($form->isSubmitted() && $form->isValid()) {
187 187
             //Check if we editing a user and if we need to change the password of it
188
-            if ($entity instanceof User && ! empty($form['new_password']->getData())) {
188
+            if ($entity instanceof User && !empty($form['new_password']->getData())) {
189 189
                 $password = $this->passwordEncoder->encodePassword($entity, $form['new_password']->getData());
190 190
                 $entity->setPassword($password);
191 191
                 //By default the user must change the password afterwards
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
                 'attachment_class' => $this->attachment_class,
227 227
                 'parameter_class' => $this->parameter_class,
228 228
             ]);
229
-        } elseif ($form->isSubmitted() && ! $form->isValid()) {
229
+        } elseif ($form->isSubmitted() && !$form->isValid()) {
230 230
             $this->addFlash('error', 'entity.edit_flash.invalid');
231 231
         }
232 232
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
         $form->handleRequest($request);
269 269
 
270 270
         if ($form->isSubmitted() && $form->isValid()) {
271
-            if ($new_entity instanceof User && ! empty($form['new_password']->getData())) {
271
+            if ($new_entity instanceof User && !empty($form['new_password']->getData())) {
272 272
                 $password = $this->passwordEncoder->encodePassword($new_entity, $form['new_password']->getData());
273 273
                 $new_entity->setPassword($password);
274 274
                 //By default the user must change the password afterwards
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
             return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]);
304 304
         }
305 305
 
306
-        if ($form->isSubmitted() && ! $form->isValid()) {
306
+        if ($form->isSubmitted() && !$form->isValid()) {
307 307
             $this->addFlash('error', 'entity.created_flash.invalid');
308 308
         }
309 309
 
Please login to merge, or discard this patch.