@@ -98,7 +98,7 @@ |
||
98 | 98 | $tmp = ''; |
99 | 99 | |
100 | 100 | //The element is existing |
101 | - if ($target instanceof NamedElementInterface && ! empty($target->getName())) { |
|
101 | + if ($target instanceof NamedElementInterface && !empty($target->getName())) { |
|
102 | 102 | try { |
103 | 103 | $tmp = sprintf( |
104 | 104 | '<a href="%s">%s</a>', |
@@ -381,7 +381,7 @@ |
||
381 | 381 | $class = get_class($entity); |
382 | 382 | |
383 | 383 | //Check if we have an direct mapping for the given class |
384 | - if (! array_key_exists($class, $map)) { |
|
384 | + if (!array_key_exists($class, $map)) { |
|
385 | 385 | //Check if we need to check inheritance by looping through our map |
386 | 386 | foreach (array_keys($map) as $key) { |
387 | 387 | if (is_a($entity, $key)) { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function extractParameters(string $input, string $class = PartParameter::class): array |
42 | 42 | { |
43 | - if (! is_a($class, AbstractParameter::class, true)) { |
|
43 | + if (!is_a($class, AbstractParameter::class, true)) { |
|
44 | 44 | throw new \InvalidArgumentException('$class must be a child class of AbstractParameter!'); |
45 | 45 | } |
46 | 46 | |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | |
69 | 69 | $matches = []; |
70 | 70 | \preg_match($regex, $input, $matches); |
71 | - if (! empty($matches)) { |
|
71 | + if (!empty($matches)) { |
|
72 | 72 | [, $name, $value] = $matches; |
73 | 73 | $value = trim($value); |
74 | 74 |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | $client->request('GET', static::$base_path.'/new'); |
91 | 91 | $this->assertFalse($client->getResponse()->isRedirect()); |
92 | 92 | $this->assertSame($read, $client->getResponse()->isSuccessful(), 'Controller was not successful!'); |
93 | - $this->assertSame($read, ! $client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
93 | + $this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $client->request('GET', static::$base_path.'/1'); |
116 | 116 | $this->assertFalse($client->getResponse()->isRedirect()); |
117 | 117 | $this->assertSame($read, $client->getResponse()->isSuccessful(), 'Controller was not successful!'); |
118 | - $this->assertSame($read, ! $client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
118 | + $this->assertSame($read, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | public function deleteDataProvider(): array |
@@ -152,6 +152,6 @@ discard block |
||
152 | 152 | |
153 | 153 | //Page is redirected to '/new', when delete was successful |
154 | 154 | $this->assertSame($delete, $client->getResponse()->isRedirect(static::$base_path.'/new')); |
155 | - $this->assertSame($delete, ! $client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
155 | + $this->assertSame($delete, !$client->getResponse()->isForbidden(), 'Permission Checking not working!'); |
|
156 | 156 | } |
157 | 157 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | |
82 | 82 | public function onKernelResponse(ResponseEvent $event): void |
83 | 83 | { |
84 | - if (! $this->kernel_debug) { |
|
84 | + if (!$this->kernel_debug) { |
|
85 | 85 | return; |
86 | 86 | } |
87 | 87 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | // if the user is anonymous, we use the anonymous user. |
79 | - if (! $user instanceof User) { |
|
79 | + if (!$user instanceof User) { |
|
80 | 80 | /** @var UserRepository $repo */ |
81 | 81 | $repo = $this->entityManager->getRepository(User::class); |
82 | 82 | $user = $repo->getAnonymousUser(); |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | $git = file($this->project_dir.'/.git/HEAD'); |
65 | 65 | $head = explode('/', $git[0], 3); |
66 | 66 | |
67 | - if (! isset($head[2])) { |
|
67 | + if (!isset($head[2])) { |
|
68 | 68 | return null; |
69 | 69 | } |
70 | 70 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if (is_file($filename)) { |
90 | 90 | $head = file($filename); |
91 | 91 | |
92 | - if (! isset($head[0])) { |
|
92 | + if (!isset($head[0])) { |
|
93 | 93 | return null; |
94 | 94 | } |
95 | 95 |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function requestPwReset(PasswordResetManager $passwordReset, Request $request) |
102 | 102 | { |
103 | - if (! $this->allow_email_pw_reset) { |
|
103 | + if (!$this->allow_email_pw_reset) { |
|
104 | 104 | throw new AccessDeniedHttpException('The password reset via email is disabled!'); |
105 | 105 | } |
106 | 106 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | */ |
145 | 145 | public function pwResetNewPw(PasswordResetManager $passwordReset, Request $request, EntityManagerInterface $em, EventDispatcherInterface $eventDispatcher, ?string $user = null, ?string $token = null) |
146 | 146 | { |
147 | - if (! $this->allow_email_pw_reset) { |
|
147 | + if (!$this->allow_email_pw_reset) { |
|
148 | 148 | throw new AccessDeniedHttpException('The password reset via email is disabled!'); |
149 | 149 | } |
150 | 150 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | $data = $form->getData(); |
190 | 190 | //Try to set the new password |
191 | 191 | $success = $passwordReset->setNewPassword($data['username'], $data['token'], $data['new_password']); |
192 | - if (! $success) { |
|
192 | + if (!$success) { |
|
193 | 193 | $this->addFlash('error', 'pw_reset.new_pw.error'); |
194 | 194 | } else { |
195 | 195 | $this->addFlash('success', 'pw_reset.new_pw.success'); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * |
122 | 122 | * @return Response |
123 | 123 | */ |
124 | - public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?User $entity = null): Response |
|
124 | + public function new(Request $request, EntityManagerInterface $em, EntityImporter $importer, ?User $entity = null) : Response |
|
125 | 125 | { |
126 | 126 | return $this->_new($request, $em, $importer, $entity); |
127 | 127 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | //If no user id was passed, then we show info about the current user |
172 | 172 | if (null === $user) { |
173 | 173 | $tmp = $this->getUser(); |
174 | - if (! $tmp instanceof User) { |
|
174 | + if (!$tmp instanceof User) { |
|
175 | 175 | throw new InvalidArgumentException('Userinfo only works for database users!'); |
176 | 176 | } |
177 | 177 | $user = $tmp; |