@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Repository/BaseRepository.php |
5 | 5 | * |
@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | { |
170 | 170 | foreach (self::$joins as $joinType => $joins) { |
171 | 171 | array_map( |
172 | - static fn (array $joinParameters): QueryBuilder => $queryBuilder->{$joinType}(...$joinParameters), |
|
172 | + static fn(array $joinParameters): QueryBuilder => $queryBuilder->{$joinType}(...$joinParameters), |
|
173 | 173 | $joins, |
174 | 174 | ); |
175 | 175 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Repository/Traits/RepositoryMethodsTrait.php |
5 | 5 | * |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | return $output instanceof EntityInterface ? $output : null; |
32 | 32 | } |
33 | 33 | |
34 | - public function findAdvanced(string $id, string | int | null $hydrationMode = null): null | array | EntityInterface |
|
34 | + public function findAdvanced(string $id, string|int|null $hydrationMode = null): null|array|EntityInterface |
|
35 | 35 | { |
36 | 36 | // Get query builder |
37 | 37 | $queryBuilder = $this->getQueryBuilder(); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Repository/Interfaces/BaseRepositoryInterface.php |
5 | 5 | * |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * |
88 | 88 | * @throws NonUniqueResultException |
89 | 89 | */ |
90 | - public function findAdvanced(string $id, string | int | null $hydrationMode = null): null | array | EntityInterface; |
|
90 | + public function findAdvanced(string $id, string|int|null $hydrationMode = null): null|array|EntityInterface; |
|
91 | 91 | |
92 | 92 | /** |
93 | 93 | * Wrapper for default Doctrine repository findOneBy method. |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Security/UserTypeIdentification.php |
5 | 5 | * |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | * object implementing a __toString method, or the username as a regular |
87 | 87 | * string. |
88 | 88 | */ |
89 | - private function getUserToken(): UserInterface | Stringable | string | null |
|
89 | + private function getUserToken(): UserInterface|Stringable|string|null |
|
90 | 90 | { |
91 | 91 | $token = $this->tokenStorage->getToken(); |
92 | 92 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Resource/ResourceCollection.php |
5 | 5 | * |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | public function filter(string $className): Closure |
67 | 67 | { |
68 | - return static fn (RestResourceInterface $restResource): bool => $restResource instanceof $className; |
|
68 | + return static fn(RestResourceInterface $restResource): bool => $restResource instanceof $className; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | public function getErrorMessage(string $className): string |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | return null; |
87 | 87 | } |
88 | 88 | |
89 | - $callback = static fn (RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName; |
|
89 | + $callback = static fn(RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName; |
|
90 | 90 | |
91 | 91 | $filteredIterator = new CallbackFilterIterator(new IteratorIterator($iterator), $callback); |
92 | 92 | $filteredIterator->rewind(); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Rest/RequestHandler.php |
5 | 5 | * |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | try { |
67 | 67 | $where = array_filter( |
68 | 68 | (array)JSON::decode((string)$request->get('where', '{}'), true), |
69 | - static fn ($value): bool => $value !== null, |
|
69 | + static fn($value): bool => $value !== null, |
|
70 | 70 | ); |
71 | 71 | } catch (JsonException $error) { |
72 | 72 | throw new HttpException( |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | $searchTerms = JSON::decode($search, true); |
202 | 202 | |
203 | 203 | self::checkSearchTerms($searchTerms); |
204 | - } catch (JsonException | LogicException) { |
|
204 | + } catch (JsonException|LogicException) { |
|
205 | 205 | $searchTerms = null; |
206 | 206 | } |
207 | 207 | |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | private static function normalizeSearchTerms(array $searchTerms): array |
238 | 238 | { |
239 | 239 | // Normalize user input, note that this support array and string formats on value |
240 | - array_walk($searchTerms, static fn (array $terms): array => array_unique(array_values(array_filter($terms)))); |
|
240 | + array_walk($searchTerms, static fn(array $terms): array => array_unique(array_values(array_filter($terms)))); |
|
241 | 241 | |
242 | 242 | return $searchTerms; |
243 | 243 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | */ |
248 | 248 | private static function getIterator(array &$output): Closure |
249 | 249 | { |
250 | - return static function (string $value, string | int $key) use (&$output): void { |
|
250 | + return static function (string $value, string|int $key) use (&$output): void { |
|
251 | 251 | $order = in_array(mb_strtoupper($value), ['ASC', 'DESC'], true) ? mb_strtoupper($value) : 'ASC'; |
252 | 252 | $column = is_string($key) ? $key : $value; |
253 | 253 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Entity/UserGroup.php |
5 | 5 | * |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | #[Groups([ |
124 | 124 | 'UserGroup.users', |
125 | 125 | ])] |
126 | - private Collection | ArrayCollection $users; |
|
126 | + private Collection|ArrayCollection $users; |
|
127 | 127 | |
128 | 128 | /** |
129 | 129 | * @var Collection<int, ApiKey>|ArrayCollection<int, ApiKey> |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | #[Groups([ |
140 | 140 | 'UserGroup.apiKeys', |
141 | 141 | ])] |
142 | - private Collection | ArrayCollection $apiKeys; |
|
142 | + private Collection|ArrayCollection $apiKeys; |
|
143 | 143 | |
144 | 144 | public function __construct() |
145 | 145 | { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | /** |
187 | 187 | * @return Collection<int, User>|ArrayCollection<int, User> |
188 | 188 | */ |
189 | - public function getUsers(): Collection | ArrayCollection |
|
189 | + public function getUsers(): Collection|ArrayCollection |
|
190 | 190 | { |
191 | 191 | return $this->users; |
192 | 192 | } |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | /** |
195 | 195 | * @return Collection<int, ApiKey>|ArrayCollection<int, ApiKey> |
196 | 196 | */ |
197 | - public function getApiKeys(): Collection | ArrayCollection |
|
197 | + public function getApiKeys(): Collection|ArrayCollection |
|
198 | 198 | { |
199 | 199 | return $this->apiKeys; |
200 | 200 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/AutoMapper/ApiKey/RequestMapper.php |
5 | 5 | * |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | protected function transformUserGroups(array $userGroups): array |
48 | 48 | { |
49 | 49 | return array_map( |
50 | - fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
50 | + fn(string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
51 | 51 | $userGroups, |
52 | 52 | ); |
53 | 53 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/AutoMapper/User/RequestMapper.php |
5 | 5 | * |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | protected function transformUserGroups(array $userGroups): array |
53 | 53 | { |
54 | 54 | return array_map( |
55 | - fn (string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
55 | + fn(string $userGroupUuid): UserGroup => $this->userGroupResource->getReference($userGroupUuid), |
|
56 | 56 | $userGroups, |
57 | 57 | ); |
58 | 58 | } |