@@ -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 | * |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | final class SearchTerm implements SearchTermInterface |
| 34 | 34 | { |
| 35 | 35 | public static function getCriteria( |
| 36 | - array | string | null $column, |
|
| 37 | - array | string | null $search, |
|
| 36 | + array|string|null $column, |
|
| 37 | + array|string|null $search, |
|
| 38 | 38 | ?string $operand = null, |
| 39 | 39 | ?int $mode = null, |
| 40 | 40 | ): ?array { |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | */ |
| 95 | 95 | private static function getTermIterator(array $columns, int $mode): Closure |
| 96 | 96 | { |
| 97 | - return static fn (string $term): ?array => !empty($columns) |
|
| 97 | + return static fn(string $term): ?array => !empty($columns) |
|
| 98 | 98 | ? array_map(self::getColumnIterator($term, $mode), $columns) |
| 99 | 99 | : null; |
| 100 | 100 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * |
| 112 | 112 | * @return array<int, string> |
| 113 | 113 | */ |
| 114 | - return static fn (string $column): array => [ |
|
| 114 | + return static fn(string $column): array => [ |
|
| 115 | 115 | !str_contains($column, '.') ? 'entity.' . $column : $column, 'like', self::getTerm($mode, $term), |
| 116 | 116 | ]; |
| 117 | 117 | } |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | private static function getTerm(int $mode, string $term): string |
| 123 | 123 | { |
| 124 | - return match ($mode) { |
|
| 124 | + return match($mode) { |
|
| 125 | 125 | self::MODE_STARTS_WITH => $term . '%', |
| 126 | 126 | self::MODE_ENDS_WITH => '%' . $term, |
| 127 | 127 | default => '%' . $term . '%', // self::MODE_FULL |
@@ -134,12 +134,12 @@ discard block |
||
| 134 | 134 | * |
| 135 | 135 | * @return array<int, string> |
| 136 | 136 | */ |
| 137 | - private static function getColumns(array | string | null $column): array |
|
| 137 | + private static function getColumns(array|string|null $column): array |
|
| 138 | 138 | { |
| 139 | 139 | // Normalize column and search parameters |
| 140 | 140 | return array_filter( |
| 141 | 141 | array_map('trim', (is_array($column) ? $column : (array)(string)$column)), |
| 142 | - static fn (string $value): bool => trim($value) !== '' |
|
| 142 | + static fn(string $value) : bool => trim($value) !== '' |
|
| 143 | 143 | ); |
| 144 | 144 | } |
| 145 | 145 | |
@@ -150,14 +150,14 @@ discard block |
||
| 150 | 150 | * |
| 151 | 151 | * @return array<int, string> |
| 152 | 152 | */ |
| 153 | - private static function getSearchTerms(array | string | null $search): array |
|
| 153 | + private static function getSearchTerms(array|string|null $search): array |
|
| 154 | 154 | { |
| 155 | 155 | if (is_string($search)) { |
| 156 | 156 | preg_match_all('#([^\"]\S*|\".+?\")\s*#', trim($search), $matches); |
| 157 | 157 | |
| 158 | 158 | if ($matches[1]) { |
| 159 | 159 | $search = array_map( |
| 160 | - static fn (string $term): string => trim(str_replace('"', '', $term)), |
|
| 160 | + static fn(string $term): string => trim(str_replace('"', '', $term)), |
|
| 161 | 161 | $matches[1], |
| 162 | 162 | ); |
| 163 | 163 | } |
@@ -166,10 +166,10 @@ discard block |
||
| 166 | 166 | return array_unique( |
| 167 | 167 | array_filter( |
| 168 | 168 | array_map( |
| 169 | - static fn (string $term): string => (string)preg_replace('#\s+#', ' ', $term), |
|
| 169 | + static fn(string $term): string => (string)preg_replace('#\s+#', ' ', $term), |
|
| 170 | 170 | array_map('trim', (is_array($search) ? $search : explode(' ', (string)$search))), |
| 171 | 171 | ), |
| 172 | - static fn (string $value): bool => trim($value) !== '' |
|
| 172 | + static fn(string $value) : bool => trim($value) !== '' |
|
| 173 | 173 | ) |
| 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/Entity/Traits/LogRequestProcessRequestTrait.php |
| 5 | 5 | * |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | // Clean possible sensitive data from parameters |
| 340 | 340 | array_walk( |
| 341 | 341 | $rawHeaders, |
| 342 | - fn (mixed &$value, string $key) => $this->cleanParameters($value, $key), |
|
| 342 | + fn(mixed &$value, string $key) => $this->cleanParameters($value, $key), |
|
| 343 | 343 | ); |
| 344 | 344 | |
| 345 | 345 | $this->headers = $rawHeaders; |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | // Clean possible sensitive data from parameters |
| 350 | 350 | array_walk( |
| 351 | 351 | $rawParameters, |
| 352 | - fn (mixed &$value, string $key) => $this->cleanParameters($value, $key), |
|
| 352 | + fn(mixed &$value, string $key) => $this->cleanParameters($value, $key), |
|
| 353 | 353 | ); |
| 354 | 354 | |
| 355 | 355 | $this->parameters = $rawParameters; |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | if (is_array($value)) { |
| 428 | 428 | array_walk( |
| 429 | 429 | $value, |
| 430 | - fn (mixed &$value, string $key) => $this->cleanParameters($value, $key), |
|
| 430 | + fn(mixed &$value, string $key) => $this->cleanParameters($value, $key), |
|
| 431 | 431 | ); |
| 432 | 432 | } |
| 433 | 433 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | // phpcs:ignoreFile |
| 5 | 5 | namespace DoctrineMigrations; |
@@ -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 | * |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | // Password hash callback |
| 64 | - $callback = fn (string $plainPassword): string => $this->userPasswordHasher |
|
| 64 | + $callback = fn(string $plainPassword): string => $this->userPasswordHasher |
|
| 65 | 65 | ->hashPassword(new SecurityUser($user, []), $plainPassword); |
| 66 | 66 | |
| 67 | 67 | // 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/Security/SecurityUser.php |
| 5 | 5 | * |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | class SecurityUser implements UserInterface, PasswordAuthenticatedUserInterface |
| 22 | 22 | { |
| 23 | 23 | private string $identifier; |
| 24 | - private string | null $password; |
|
| 24 | + private string|null $password; |
|
| 25 | 25 | private string $language; |
| 26 | 26 | private string $locale; |
| 27 | 27 | private string $timezone; |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * /src/EventSubscriber/LockedUserSubscriber.php |
| 5 | 5 | * |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | /** |
| 94 | 94 | * @throws Throwable |
| 95 | 95 | */ |
| 96 | - private function getUser(string | object $user): ?User |
|
| 96 | + private function getUser(string|object $user): ?User |
|
| 97 | 97 | { |
| 98 | - return match (true) { |
|
| 98 | + return match(true) { |
|
| 99 | 99 | is_string($user) => $this->userRepository->loadUserByIdentifier($user, false), |
| 100 | 100 | $user instanceof SecurityUser => |
| 101 | 101 | $this->userRepository->loadUserByIdentifier($user->getUserIdentifier(), true), |
@@ -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/Interfaces/SearchTermInterface.php |
| 5 | 5 | * |
@@ -38,8 +38,8 @@ discard block |
||
| 38 | 38 | * @return array<string, array<string, array<string, string>>>|null |
| 39 | 39 | */ |
| 40 | 40 | public static function getCriteria( |
| 41 | - array | string $column, |
|
| 42 | - array | string $search, |
|
| 41 | + array|string $column, |
|
| 42 | + array|string $search, |
|
| 43 | 43 | ?string $operand = null, |
| 44 | 44 | ?int $mode = null, |
| 45 | 45 | ): ?array; |
@@ -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 | * |
@@ -86,8 +86,8 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | $packageNameLength = (int)max( |
| 88 | 88 | array_map( |
| 89 | - static fn (array $row): int => isset($row[1]) ? strlen($row[1]) : 0, |
|
| 90 | - array_filter($rows, static fn (mixed $row): bool => !$row instanceof TableSeparator) |
|
| 89 | + static fn(array $row): int => isset($row[1]) ? strlen($row[1]) : 0, |
|
| 90 | + array_filter($rows, static fn(mixed $row) : bool => !$row instanceof TableSeparator) |
|
| 91 | 91 | ) + [0] |
| 92 | 92 | ); |
| 93 | 93 | |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | ->directories() |
| 129 | 129 | ->in($this->projectDir . DIRECTORY_SEPARATOR . 'tools/'); |
| 130 | 130 | |
| 131 | - $closure = static fn (SplFileInfo $fileInfo): string => $fileInfo->getPath(); |
|
| 131 | + $closure = static fn(SplFileInfo $fileInfo): string => $fileInfo->getPath(); |
|
| 132 | 132 | |
| 133 | 133 | /** @var Traversable<SplFileInfo> $iterator */ |
| 134 | 134 | $iterator = $finder->getIterator(); |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | |
| 4 | 4 | // phpcs:ignoreFile |
| 5 | 5 | namespace DoctrineMigrations; |