@@ -62,16 +62,16 @@ |
||
62 | 62 | //Disable import if user is not allowed to create elements. |
63 | 63 | $entity = new $data['entity_class']; |
64 | 64 | $perm_name = "create"; |
65 | - $disabled = ! $this->security->isGranted($perm_name, $entity); |
|
65 | + $disabled = !$this->security->isGranted($perm_name, $entity); |
|
66 | 66 | |
67 | 67 | $builder |
68 | 68 | |
69 | 69 | ->add('format', ChoiceType::class, ['choices' => |
70 | - ['JSON' => 'json', 'XML' => 'xml','CSV'=>'csv' ,'YAML' => 'yaml'], 'label' => 'export.format', |
|
70 | + ['JSON' => 'json', 'XML' => 'xml', 'CSV'=>'csv', 'YAML' => 'yaml'], 'label' => 'export.format', |
|
71 | 71 | 'disabled' => $disabled]) |
72 | 72 | ->add('csv_separator', TextType::class, ['data' => ';', 'label' => 'import.csv_separator', |
73 | 73 | 'disabled' => $disabled]); |
74 | - if($data['entity_class'] instanceof StructuralDBElement) { |
|
74 | + if ($data['entity_class'] instanceof StructuralDBElement) { |
|
75 | 75 | $builder-> |
76 | 76 | add('parent', EntityType::class, ['class' => $data['entity_class'], 'choice_label' => 'full_path', |
77 | 77 | 'attr' => ['class' => 'selectpicker', 'data-live-search' => true], 'required' => false, |
@@ -68,7 +68,7 @@ |
||
68 | 68 | public function getTests() |
69 | 69 | { |
70 | 70 | return [ |
71 | - new TwigTest('instanceof', function ($var, $instance) { |
|
71 | + new TwigTest('instanceof', function($var, $instance) { |
|
72 | 72 | return $var instanceof $instance; |
73 | 73 | } ) |
74 | 74 | ]; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $em->flush(); |
97 | 97 | //$this->addFlash('success', $translator->trans('part.created_flash')); |
98 | 98 | |
99 | - return $this->redirectToRoute($this->route_base . '_edit', ['id' => $new_entity->getID()]); |
|
99 | + return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | //Import form |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | |
116 | 116 | foreach ($errors as $name => $error) { |
117 | 117 | /** @var $error ConstraintViolationList */ |
118 | - $this->addFlash('error', $name . ":" . $error); |
|
118 | + $this->addFlash('error', $name.":".$error); |
|
119 | 119 | } |
120 | 120 | } |
121 | 121 | |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | $this->addFlash('success', 'attachment_type.deleted'); |
156 | 156 | } |
157 | 157 | |
158 | - return $this->redirectToRoute($this->route_base . '_new'); |
|
158 | + return $this->redirectToRoute($this->route_base.'_new'); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | protected function _exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request) |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | |
167 | 167 | $entities = $em->getRepository($this->entity_class)->findAll(); |
168 | 168 | |
169 | - return $exporter->exportEntityFromRequest($entities,$request); |
|
169 | + return $exporter->exportEntityFromRequest($entities, $request); |
|
170 | 170 | } |
171 | 171 | |
172 | 172 | protected function _exportEntity(NamedDBElement $entity, EntityExporter $exporter, Request $request) |
@@ -88,7 +88,7 @@ |
||
88 | 88 | |
89 | 89 | $tree_node = new TreeViewNode($element->__toString(), $href, $children_nodes); |
90 | 90 | |
91 | - if($children_nodes != null) { |
|
91 | + if ($children_nodes != null) { |
|
92 | 92 | $tree_node->addTag((string) count($children_nodes)); |
93 | 93 | } |
94 | 94 |
@@ -145,7 +145,7 @@ |
||
145 | 145 | return $this->urlGenerator->generate("footprint_edit", ['id' => $entity->getID()]); |
146 | 146 | } |
147 | 147 | |
148 | - if($entity instanceof User) { |
|
148 | + if ($entity instanceof User) { |
|
149 | 149 | return $this->urlGenerator->generate('user_edit', ['id' => $entity->getID()]); |
150 | 150 | } |
151 | 151 |