Passed
Push — master ( a4ee46...6ad24a )
by Jan
04:54
created
src/Form/CollectionTypeExtension.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function buildForm(FormBuilderInterface $builder, array $options)
76 76
     {
77
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) {
77
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) {
78 78
             $data = $event->getData();
79 79
             $config = $event->getForm()->getConfig();
80 80
             //If enabled do a reindexing of the collection
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
                 $error_mapping = [];
85 85
 
86 86
                 foreach ($data->toArray() as $key => $item) {
87
-                    $index = $options['reindex_prefix'] . $this->propertyAccess->getValue($item, $options['reindex_path']);
88
-                    $error_mapping['[' . $key . ']'] = $index;
87
+                    $index = $options['reindex_prefix'].$this->propertyAccess->getValue($item, $options['reindex_path']);
88
+                    $error_mapping['['.$key.']'] = $index;
89 89
                     $reindexed_data->set($index, $item);
90 90
                 }
91 91
                 $event->setData($reindexed_data);
Please login to merge, or discard this patch.
src/Controller/PartController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             $this->addFlash('info', 'part.edited_flash');
187 187
             //Reload form, so the SIUnitType entries use the new part unit
188 188
             $form = $this->createForm(PartBaseType::class, $part);
189
-        } elseif ($form->isSubmitted() && ! $form->isValid()) {
189
+        } elseif ($form->isSubmitted() && !$form->isValid()) {
190 190
             $this->addFlash('error', 'part.edited_flash.invalid');
191 191
         }
192 192
 
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      * @return Response
232 232
      */
233 233
     public function new(Request $request, EntityManagerInterface $em, TranslatorInterface $translator,
234
-        AttachmentManager $attachmentHelper, AttachmentSubmitHandler $attachmentSubmitHandler, ?Part $part = null): Response
234
+        AttachmentManager $attachmentHelper, AttachmentSubmitHandler $attachmentSubmitHandler, ?Part $part = null) : Response
235 235
     {
236 236
         if (null === $part) {
237 237
             $new_part = new Part();
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         }
261 261
 
262 262
         $store_id = $request->get('storelocation', null);
263
-        $storelocation = $store_id ? $em->find(Storelocation::class, $store_id): null;
263
+        $storelocation = $store_id ? $em->find(Storelocation::class, $store_id) : null;
264 264
         if (null !== $storelocation && $new_part->getPartLots()->isEmpty()) {
265 265
             $partLot = new PartLot();
266 266
             $partLot->setStorageLocation($storelocation);
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
         }
270 270
 
271 271
         $supplier_id = $request->get('supplier', null);
272
-        $supplier = $supplier_id ? $em->find(Supplier::class, $supplier_id): null;
272
+        $supplier = $supplier_id ? $em->find(Supplier::class, $supplier_id) : null;
273 273
         if (null !== $supplier && $new_part->getOrderdetails()->isEmpty()) {
274 274
             $orderdetail = new Orderdetail();
275 275
             $orderdetail->setSupplier($supplier);
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
             return $this->redirectToRoute('part_edit', ['id' => $new_part->getID()]);
311 311
         }
312 312
 
313
-        if ($form->isSubmitted() && ! $form->isValid()) {
313
+        if ($form->isSubmitted() && !$form->isValid()) {
314 314
             $this->addFlash('error', 'part.created_flash.invalid');
315 315
         }
316 316
 
Please login to merge, or discard this patch.