Completed
Push — master ( 3d28b0...220d60 )
by Jan
03:30
created
src/Form/ImportType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,12 +60,12 @@
 block discarded – undo
60 60
         //Disable import if user is not allowed to create elements.
61 61
         $entity = new $data['entity_class'];
62 62
         $perm_name = "create";
63
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
63
+        $disabled = !$this->security->isGranted($perm_name, $entity);
64 64
 
65 65
         $builder
66 66
 
67 67
             ->add('format', ChoiceType::class, ['choices' =>
68
-                ['JSON' => 'json', 'XML' => 'xml','CSV'=>'csv' ,'YAML' => 'yaml'], 'label' => 'export.format',
68
+                ['JSON' => 'json', 'XML' => 'xml', 'CSV'=>'csv', 'YAML' => 'yaml'], 'label' => 'export.format',
69 69
                 'disabled' => $disabled])
70 70
             ->add('csv_separator', TextType::class, ['data' => ';', 'label' => 'import.csv_separator',
71 71
                 'disabled' => $disabled])
Please login to merge, or discard this patch.
src/Services/EntityImporter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -137,11 +137,11 @@
 block discarded – undo
137 137
         }
138 138
 
139 139
         //The [] behind class_name denotes that we expect an array.
140
-        $entities = $this->serializer->deserialize($content, $class_name . '[]', $options['format'],
140
+        $entities = $this->serializer->deserialize($content, $class_name.'[]', $options['format'],
141 141
             ['groups' => $groups, 'csv_delimiter' => $options['csv_separator']]);
142 142
 
143 143
         //Ensure we have an array of entitity elements.
144
-        if(!is_array($entities)) {
144
+        if (!is_array($entities)) {
145 145
             $entities = [$entities];
146 146
         }
147 147
 
Please login to merge, or discard this patch.
src/Services/StructuralElementRecursionHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
             $em->remove($element);
96 96
         });
97 97
 
98
-        if($flush) {
98
+        if ($flush) {
99 99
             $em->flush();
100 100
         }
101 101
     }
Please login to merge, or discard this patch.