@@ -60,12 +60,12 @@ |
||
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]) |
@@ -137,11 +137,11 @@ |
||
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 |
@@ -95,7 +95,7 @@ |
||
95 | 95 | $em->remove($element); |
96 | 96 | }); |
97 | 97 | |
98 | - if($flush) { |
|
98 | + if ($flush) { |
|
99 | 99 | $em->flush(); |
100 | 100 | } |
101 | 101 | } |