@@ -53,6 +53,6 @@ |
||
53 | 53 | |
54 | 54 | //Page is redirected to '/new', when delete was successful |
55 | 55 | $this->assertSame($delete, $client->getResponse()->isRedirect(static::$base_path.'/new')); |
56 | - $this->assertSame($delete, ! $client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
56 | + $this->assertSame($delete, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
57 | 57 | } |
58 | 58 | } |
59 | 59 | \ No newline at end of file |
@@ -49,7 +49,7 @@ |
||
49 | 49 | [[1, 2, 3, 4], "1, 2,3 - 4"], |
50 | 50 | [[1, 2, 3], " 1; 2, 3"], |
51 | 51 | [[-1, 0, 1, 2], "-1; 0; 1, 2"], |
52 | - [[4,3, 1, 2], "4,3, 1;2"], |
|
52 | + [[4, 3, 1, 2], "4,3, 1;2"], |
|
53 | 53 | [[1, 2, 3, 4], "2-1, 3-4"], |
54 | 54 | [[1], "1-1"], |
55 | 55 | [[-3, -2, -1], "-3--1"], |
@@ -46,7 +46,7 @@ |
||
46 | 46 | { |
47 | 47 | parent::prepare($request); |
48 | 48 | |
49 | - $this->headers->set('Content-Type','application/pdf'); |
|
49 | + $this->headers->set('Content-Type', 'application/pdf'); |
|
50 | 50 | |
51 | 51 | |
52 | 52 | if ('HTTP/1.0' !== $request->server->get('SERVER_PROTOCOL')) { |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | if (!empty($type_children)) { |
66 | 66 | //Use default label e.g. 'part_label'. $$ marks that it will be translated in TreeViewGenerator |
67 | - $tmp = new TreeViewNode('$$' . $type . '.label', null, $type_children); |
|
67 | + $tmp = new TreeViewNode('$$'.$type.'.label', null, $type_children); |
|
68 | 68 | |
69 | 69 | $result[] = $tmp; |
70 | 70 | } |
@@ -58,7 +58,7 @@ |
||
58 | 58 | { |
59 | 59 | $this->allowedMethods = []; |
60 | 60 | foreach ($methods as $class => $m) { |
61 | - $this->allowedMethods[$class] = array_map(function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]); |
|
61 | + $this->allowedMethods[$class] = array_map(function($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]); |
|
62 | 62 | } |
63 | 63 | } |
64 | 64 |
@@ -95,7 +95,7 @@ |
||
95 | 95 | * |
96 | 96 | * @return Response |
97 | 97 | */ |
98 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AttachmentType $entity = null): Response |
|
98 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?AttachmentType $entity = null) : Response |
|
99 | 99 | { |
100 | 100 | return $this->_new($request, $em, $importer, $entity); |
101 | 101 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $table = null; |
166 | 166 | } |
167 | 167 | |
168 | - $form_options = [ |
|
168 | + $form_options = [ |
|
169 | 169 | 'attachment_class' => $this->attachment_class, |
170 | 170 | 'parameter_class' => $this->parameter_class, |
171 | 171 | 'disabled' => null !== $timeTravel_timestamp ? true : null, |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $form->handleRequest($request); |
186 | 186 | if ($form->isSubmitted() && $form->isValid()) { |
187 | 187 | //Check if we editing a user and if we need to change the password of it |
188 | - if ($entity instanceof User && ! empty($form['new_password']->getData())) { |
|
188 | + if ($entity instanceof User && !empty($form['new_password']->getData())) { |
|
189 | 189 | $password = $this->passwordEncoder->encodePassword($entity, $form['new_password']->getData()); |
190 | 190 | $entity->setPassword($password); |
191 | 191 | //By default the user must change the password afterwards |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | 'attachment_class' => $this->attachment_class, |
227 | 227 | 'parameter_class' => $this->parameter_class, |
228 | 228 | ]); |
229 | - } elseif ($form->isSubmitted() && ! $form->isValid()) { |
|
229 | + } elseif ($form->isSubmitted() && !$form->isValid()) { |
|
230 | 230 | $this->addFlash('error', 'entity.edit_flash.invalid'); |
231 | 231 | } |
232 | 232 | |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $form->handleRequest($request); |
269 | 269 | |
270 | 270 | if ($form->isSubmitted() && $form->isValid()) { |
271 | - if ($new_entity instanceof User && ! empty($form['new_password']->getData())) { |
|
271 | + if ($new_entity instanceof User && !empty($form['new_password']->getData())) { |
|
272 | 272 | $password = $this->passwordEncoder->encodePassword($new_entity, $form['new_password']->getData()); |
273 | 273 | $new_entity->setPassword($password); |
274 | 274 | //By default the user must change the password afterwards |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]); |
304 | 304 | } |
305 | 305 | |
306 | - if ($form->isSubmitted() && ! $form->isValid()) { |
|
306 | + if ($form->isSubmitted() && !$form->isValid()) { |
|
307 | 307 | $this->addFlash('error', 'entity.created_flash.invalid'); |
308 | 308 | } |
309 | 309 |
@@ -146,15 +146,15 @@ |
||
146 | 146 | |
147 | 147 | protected function getLabelName(AbstractDBElement $element, ?LabelProfile $profile = null): string |
148 | 148 | { |
149 | - $ret = 'label_' . $this->elementTypeNameGenerator->getLocalizedTypeLabel($element); |
|
149 | + $ret = 'label_'.$this->elementTypeNameGenerator->getLocalizedTypeLabel($element); |
|
150 | 150 | $ret .= $element->getID(); |
151 | 151 | |
152 | - return $ret . '.pdf'; |
|
152 | + return $ret.'.pdf'; |
|
153 | 153 | } |
154 | 154 | |
155 | 155 | protected function findObjects(string $type, string $ids): array |
156 | 156 | { |
157 | - if(!isset(LabelGenerator::CLASS_SUPPORT_MAPPING[$type])) { |
|
157 | + if (!isset(LabelGenerator::CLASS_SUPPORT_MAPPING[$type])) { |
|
158 | 158 | throw new \InvalidArgumentException('The given type is not known and can not be mapped to a class!'); |
159 | 159 | } |
160 | 160 |
@@ -53,7 +53,7 @@ |
||
53 | 53 | throw new UnexpectedValueException($value, 'string'); |
54 | 54 | } |
55 | 55 | |
56 | - if(!$this->rangeParser->isValidRange($value)) { |
|
56 | + if (!$this->rangeParser->isValidRange($value)) { |
|
57 | 57 | $this->context->buildViolation($constraint->message) |
58 | 58 | ->addViolation(); |
59 | 59 | } |