Completed
Push — master ( 082a81...03c1d3 )
by Jan
04:57
created
src/Controller/AdminPages/BaseAdminController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             //Rebuild form, so it is based on the updated data. Important for the parent field!
81 81
             //We can not use dynamic form events here, because the parent entity list is build from database!
82 82
             $form = $this->createForm($this->form_class, $entity);
83
-        } elseif ($form->isSubmitted() && ! $form->isValid()) {
83
+        } elseif ($form->isSubmitted() && !$form->isValid()) {
84 84
             $this->addFlash('error', $this->translator->trans('entity.edit_flash.invalid'));
85 85
         }
86 86
 
@@ -107,8 +107,8 @@  discard block
 block discarded – undo
107 107
             $em->flush();
108 108
             $this->addFlash('success', $this->translator->trans('entity.created_flash'));
109 109
 
110
-            return $this->redirectToRoute($this->route_base . '_edit', ['id' => $new_entity->getID()]);
111
-        } elseif ($form->isSubmitted() && ! $form->isValid()) {
110
+            return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]);
111
+        } elseif ($form->isSubmitted() && !$form->isValid()) {
112 112
             $this->addFlash('error', $this->translator->trans('entity.created_flash.invalid'));
113 113
         }
114 114
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
             foreach ($errors as $name => $error) {
130 130
                 /** @var $error ConstraintViolationList */
131
-                $this->addFlash('error', $name . ':' . $error);
131
+                $this->addFlash('error', $name.':'.$error);
132 132
             }
133 133
         }
134 134
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
             //Show errors to user:
148 148
             foreach ($errors as $name => $error) {
149 149
                 /** @var $error ConstraintViolationList */
150
-                $this->addFlash('error', $name . ':' . $error);
150
+                $this->addFlash('error', $name.':'.$error);
151 151
             }
152 152
         }
153 153
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             $this->addFlash('success', 'attachment_type.deleted');
189 189
         }
190 190
 
191
-        return $this->redirectToRoute($this->route_base .  '_new');
191
+        return $this->redirectToRoute($this->route_base.'_new');
192 192
     }
193 193
 
194 194
     protected function _exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request)
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
         $entities = $em->getRepository($this->entity_class)->findAll();
201 201
 
202
-        return $exporter->exportEntityFromRequest($entities,$request);
202
+        return $exporter->exportEntityFromRequest($entities, $request);
203 203
     }
204 204
 
205 205
     protected function _exportEntity(NamedDBElement $entity, EntityExporter $exporter, Request $request)
Please login to merge, or discard this patch.