@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/EventListener/UserEntityEventListener.php |
5 | 5 | * |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | // Password hash callback |
97 | - $callback = fn (string $plainPassword): string => $this->userPasswordEncoder |
|
97 | + $callback = fn(string $plainPassword): string => $this->userPasswordEncoder |
|
98 | 98 | ->encodePassword(new SecurityUser($user), $plainPassword); |
99 | 99 | |
100 | 100 | // Set new password and encode it with user encoder |
@@ -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/RepositoryWrappersTrait.php |
5 | 5 | * |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | try { |
46 | 46 | $referenceId = UuidHelper::fromString($id); |
47 | 47 | } catch (InvalidUuidStringException $exception) { |
48 | - (static fn (Throwable $exception): string => (string)$exception)($exception); |
|
48 | + (static fn(Throwable $exception): string => (string)$exception)($exception); |
|
49 | 49 | |
50 | 50 | $referenceId = $id; |
51 | 51 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | public function createQueryBuilder(?string $alias = null, ?string $indexBy = null): QueryBuilder |
109 | 109 | { |
110 | - $alias ??= 'entity'; |
|
110 | + $alias ?? = 'entity'; |
|
111 | 111 | |
112 | 112 | // Create new query builder |
113 | 113 | return $this |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Command/User/ListUserGroupsCommand.php |
5 | 5 | * |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | private function getFormatterUserGroup(): Closure |
101 | 101 | { |
102 | - $userFormatter = static fn (User $user): string => sprintf( |
|
102 | + $userFormatter = static fn(User $user): string => sprintf( |
|
103 | 103 | '%s %s <%s>', |
104 | 104 | $user->getFirstName(), |
105 | 105 | $user->getLastName(), |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Command/User/ListUsersCommand.php |
5 | 5 | * |
@@ -104,13 +104,13 @@ discard block |
||
104 | 104 | */ |
105 | 105 | private function getFormatterUser(): Closure |
106 | 106 | { |
107 | - $userGroupFormatter = static fn (UserGroup $userGroup): string => sprintf( |
|
107 | + $userGroupFormatter = static fn(UserGroup $userGroup): string => sprintf( |
|
108 | 108 | '%s (%s)', |
109 | 109 | $userGroup->getName(), |
110 | 110 | $userGroup->getRole()->getId() |
111 | 111 | ); |
112 | 112 | |
113 | - return fn (User $user): array => [ |
|
113 | + return fn(User $user): array => [ |
|
114 | 114 | $user->getId(), |
115 | 115 | $user->getUsername(), |
116 | 116 | $user->getEmail(), |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Command/Utils/CheckDependencies.php |
5 | 5 | * |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @return string |
127 | 127 | */ |
128 | - $closure = static fn (SplFileInfo $fileInfo): string => $fileInfo->getPath(); |
|
128 | + $closure = static fn(SplFileInfo $fileInfo): string => $fileInfo->getPath(); |
|
129 | 129 | |
130 | 130 | /** @var Traversable $iterator */ |
131 | 131 | $iterator = $finder->getIterator(); |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/Command/ApiKey/ListApiKeysCommand.php |
5 | 5 | * |
@@ -107,13 +107,13 @@ discard block |
||
107 | 107 | */ |
108 | 108 | private function getFormatterApiKey(): Closure |
109 | 109 | { |
110 | - $userGroupFormatter = static fn (UserGroup $userGroup): string => sprintf( |
|
110 | + $userGroupFormatter = static fn(UserGroup $userGroup): string => sprintf( |
|
111 | 111 | '%s (%s)', |
112 | 112 | $userGroup->getName(), |
113 | 113 | $userGroup->getRole()->getId() |
114 | 114 | ); |
115 | 115 | |
116 | - return fn (ApiKey $apiToken): array => [ |
|
116 | + return fn(ApiKey $apiToken): array => [ |
|
117 | 117 | $apiToken->getId(), |
118 | 118 | $apiToken->getToken(), |
119 | 119 | $apiToken->getDescription(), |
@@ -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/RestRequestMapper.php |
5 | 5 | * |
@@ -137,6 +137,6 @@ discard block |
||
137 | 137 | */ |
138 | 138 | private function getValidProperties(Request $request): array |
139 | 139 | { |
140 | - return array_filter(static::$properties, static fn ($property) => $request->request->has($property)); |
|
140 | + return array_filter(static::$properties, static fn($property) => $request->request->has($property)); |
|
141 | 141 | } |
142 | 142 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -declare(strict_types = 1); |
|
2 | +declare(strict_types=1); |
|
3 | 3 | /** |
4 | 4 | * /src/DTO/RestDto.php |
5 | 5 | * |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function getVisited(): array |
88 | 88 | { |
89 | - return array_filter($this->visited, static fn (string $property): bool => $property !== 'id'); |
|
89 | + return array_filter($this->visited, static fn(string $property): bool => $property !== 'id'); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | 'has' . ucfirst($property), |
200 | 200 | ]; |
201 | 201 | |
202 | - $getterMethods = array_filter($getters, static fn (string $method): bool => method_exists($dto, $method)); |
|
202 | + $getterMethods = array_filter($getters, static fn(string $method): bool => method_exists($dto, $method)); |
|
203 | 203 | |
204 | 204 | return $this->validateGetterMethod($property, $getterMethods); |
205 | 205 | } |
@@ -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/SearchTerm.php |
5 | 5 | * |
@@ -42,8 +42,8 @@ discard block |
||
42 | 42 | */ |
43 | 43 | public static function getCriteria($column, $search, ?string $operand = null, ?int $mode = null): ?array |
44 | 44 | { |
45 | - $operand ??= self::OPERAND_OR; |
|
46 | - $mode ??= self::MODE_FULL; |
|
45 | + $operand ?? = self::OPERAND_OR; |
|
46 | + $mode ?? = self::MODE_FULL; |
|
47 | 47 | |
48 | 48 | $columns = self::getColumns($column); |
49 | 49 | $searchTerms = self::getSearchTerms($search); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | private static function getTermIterator(array $columns, int $mode): Closure |
105 | 105 | { |
106 | - return static fn (string $term): ?array => count($columns) > 0 |
|
106 | + return static fn(string $term): ?array => count($columns) > 0 |
|
107 | 107 | ? array_map(self::getColumnIterator($term, $mode), $columns) |
108 | 108 | : null; |
109 | 109 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | * |
126 | 126 | * @return string[] |
127 | 127 | */ |
128 | - return static fn (string $column): array => [ |
|
128 | + return static fn(string $column): array => [ |
|
129 | 129 | strpos($column, '.') === false ? 'entity.' . $column : $column, 'like', self::getTerm($mode, $term), |
130 | 130 | ]; |
131 | 131 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | // Normalize column and search parameters |
167 | 167 | return array_filter( |
168 | 168 | array_map('trim', (is_array($column) ? $column : (array)$column)), |
169 | - static fn (string $value): bool => trim($value) !== '' |
|
169 | + static fn(string $value) : bool => trim($value) !== '' |
|
170 | 170 | ); |
171 | 171 | } |
172 | 172 | |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | return array_unique( |
183 | 183 | array_filter( |
184 | 184 | array_map('trim', (is_array($search) ? $search : explode(' ', (string)$search))), |
185 | - static fn (string $value): bool => trim($value) !== '' |
|
185 | + static fn(string $value) : bool => trim($value) !== '' |
|
186 | 186 | ) |
187 | 187 | ); |
188 | 188 | } |