Passed
Push — master ( 0e57c0...2dd807 )
by Jan
04:58
created
src/Controller/PartController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
             $this->addFlash('info', 'part.edited_flash');
184 184
             //Reload form, so the SIUnitType entries use the new part unit
185 185
             $form = $this->createForm(PartBaseType::class, $part);
186
-        } elseif ($form->isSubmitted() && ! $form->isValid()) {
186
+        } elseif ($form->isSubmitted() && !$form->isValid()) {
187 187
             $this->addFlash('error', 'part.edited_flash.invalid');
188 188
         }
189 189
 
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
      * @return Response
228 228
      */
229 229
     public function new(Request $request, EntityManagerInterface $em, TranslatorInterface $translator,
230
-        AttachmentSubmitHandler $attachmentSubmitHandler, ?Part $part = null): Response
230
+        AttachmentSubmitHandler $attachmentSubmitHandler, ?Part $part = null) : Response
231 231
     {
232 232
         if (null === $part) {
233 233
             $new_part = new Part();
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         }
257 257
 
258 258
         $store_id = $request->get('storelocation', null);
259
-        $storelocation = $store_id ? $em->find(Storelocation::class, $store_id): null;
259
+        $storelocation = $store_id ? $em->find(Storelocation::class, $store_id) : null;
260 260
         if (null !== $storelocation && $new_part->getPartLots()->isEmpty()) {
261 261
             $partLot = new PartLot();
262 262
             $partLot->setStorageLocation($storelocation);
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
         }
266 266
 
267 267
         $supplier_id = $request->get('supplier', null);
268
-        $supplier = $supplier_id ? $em->find(Supplier::class, $supplier_id): null;
268
+        $supplier = $supplier_id ? $em->find(Supplier::class, $supplier_id) : null;
269 269
         if (null !== $supplier && $new_part->getOrderdetails()->isEmpty()) {
270 270
             $orderdetail = new Orderdetail();
271 271
             $orderdetail->setSupplier($supplier);
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
             return $this->redirectToRoute('part_edit', ['id' => $new_part->getID()]);
307 307
         }
308 308
 
309
-        if ($form->isSubmitted() && ! $form->isValid()) {
309
+        if ($form->isSubmitted() && !$form->isValid()) {
310 310
             $this->addFlash('error', 'part.created_flash.invalid');
311 311
         }
312 312
 
Please login to merge, or discard this patch.