Completed
Push — master ( 220d60...424407 )
by Jan
03:10
created
src/Services/EntityURLGenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -110,12 +110,12 @@  discard block
 block discarded – undo
110 110
             return $this->urlGenerator->generate('part_edit', ['id' => $entity->getID()]);
111 111
         }
112 112
 
113
-        if($entity instanceof AttachmentType) {
113
+        if ($entity instanceof AttachmentType) {
114 114
             return $this->urlGenerator->generate('attachment_type_edit', ['id' => $entity->getID()]);
115 115
         }
116 116
 
117
-        if($entity instanceof Category) {
118
-            return $this->urlGenerator->generate("category_edit",  ['id' => $entity->getID()]);
117
+        if ($entity instanceof Category) {
118
+            return $this->urlGenerator->generate("category_edit", ['id' => $entity->getID()]);
119 119
         }
120 120
 
121 121
         //Otherwise throw an error
@@ -135,11 +135,11 @@  discard block
 block discarded – undo
135 135
             return $this->urlGenerator->generate('part_new');
136 136
         }
137 137
 
138
-        if($entity instanceof AttachmentType) {
138
+        if ($entity instanceof AttachmentType) {
139 139
             return $this->urlGenerator->generate('attachment_type_new');
140 140
         }
141 141
 
142
-        if($entity instanceof Category) {
142
+        if ($entity instanceof Category) {
143 143
             return $this->urlGenerator->generate('category_new');
144 144
         }
145 145
 
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
 
182 182
     public function deleteURL($entity) : string
183 183
     {
184
-        if($entity instanceof AttachmentType) {
184
+        if ($entity instanceof AttachmentType) {
185 185
             return $this->urlGenerator->generate('attachment_type_delete', ['id' => $entity->getID()]);
186 186
         }
187 187
 
188
-        if($entity instanceof Category) {
188
+        if ($entity instanceof Category) {
189 189
             return $this->urlGenerator->generate('category_delete', ['id' => $entity->getID()]);
190 190
         }
191 191
 
Please login to merge, or discard this patch.
src/Controller/BaseAdminController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             $em->flush();
96 96
             //$this->addFlash('success', $translator->trans('part.created_flash'));
97 97
 
98
-            return $this->redirectToRoute($this->route_base . '_edit', ['id' => $new_entity->getID()]);
98
+            return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]);
99 99
         }
100 100
 
101 101
         //Import form
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
             foreach ($errors as $name => $error) {
116 116
                 /** @var $error ConstraintViolationList */
117
-                $this->addFlash('error', $name . ":" . $error);
117
+                $this->addFlash('error', $name.":".$error);
118 118
             }
119 119
         }
120 120
 
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
             $this->addFlash('success', 'attachment_type.deleted');
155 155
         }
156 156
 
157
-        return $this->redirectToRoute($this->route_base .  '_new');
157
+        return $this->redirectToRoute($this->route_base.'_new');
158 158
     }
159 159
 
160 160
     protected function _exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request)
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 
166 166
         $entities = $em->getRepository($this->entity_class)->findAll();
167 167
 
168
-        return $exporter->exportEntityFromRequest($entities,$request);
168
+        return $exporter->exportEntityFromRequest($entities, $request);
169 169
     }
170 170
 
171 171
     protected function _exportEntity(StructuralDBElement $entity, EntityExporter $exporter, Request $request)
Please login to merge, or discard this patch.