@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * /src/Utils/JSON.php |
| 5 | 5 | * |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | $options ??= 0; |
| 44 | 44 | $depth ??= 512; |
| 45 | 45 | |
| 46 | - $output = json_encode($input, JSON_THROW_ON_ERROR | $options, $depth); |
|
| 46 | + $output = json_encode($input, JSON_THROW_ON_ERROR|$options, $depth); |
|
| 47 | 47 | |
| 48 | 48 | return (string)$output; |
| 49 | 49 | } |
@@ -70,6 +70,6 @@ discard block |
||
| 70 | 70 | $depth ??= 512; |
| 71 | 71 | $options ??= 0; |
| 72 | 72 | |
| 73 | - return json_decode($json, $assoc, $depth, JSON_THROW_ON_ERROR | $options); |
|
| 73 | + return json_decode($json, $assoc, $depth, JSON_THROW_ON_ERROR|$options); |
|
| 74 | 74 | } |
| 75 | 75 | } |
@@ -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/EventSubscriber/RequestLogSubscriber.php |
| 5 | 5 | * |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | || count( |
| 110 | 110 | array_filter( |
| 111 | 111 | $this->ignoredRoutes, |
| 112 | - static fn ($route): bool => strpos($route, '/*') !== false |
|
| 112 | + static fn($route): bool => strpos($route, '/*') !== false |
|
| 113 | 113 | && strpos($path, substr($route, 0, -2)) !== false |
| 114 | 114 | ) |
| 115 | 115 | ) !== 0 |
@@ -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 | * |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | |
| 72 | 72 | public function filter(string $className): Closure |
| 73 | 73 | { |
| 74 | - return static fn (RestResourceInterface $restResource): bool => $restResource instanceof $className; |
|
| 74 | + return static fn(RestResourceInterface $restResource): bool => $restResource instanceof $className; |
|
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | public function error(string $className): void |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | return null; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - $callback = static fn (RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName; |
|
| 100 | + $callback = static fn(RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName; |
|
| 101 | 101 | |
| 102 | 102 | $filteredIterator = new CallbackFilterIterator(new IteratorIterator($iterator), $callback); |
| 103 | 103 | $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/SearchTerm.php |
| 5 | 5 | * |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | */ |
| 100 | 100 | private static function getTermIterator(array $columns, int $mode): Closure |
| 101 | 101 | { |
| 102 | - return static fn (string $term): ?array => count($columns) > 0 |
|
| 102 | + return static fn(string $term): ?array => count($columns) > 0 |
|
| 103 | 103 | ? array_map(self::getColumnIterator($term, $mode), $columns) |
| 104 | 104 | : null; |
| 105 | 105 | } |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * |
| 117 | 117 | * @return array<int, string> |
| 118 | 118 | */ |
| 119 | - return static fn (string $column): array => [ |
|
| 119 | + return static fn(string $column): array => [ |
|
| 120 | 120 | strpos($column, '.') === false ? 'entity.' . $column : $column, 'like', self::getTerm($mode, $term), |
| 121 | 121 | ]; |
| 122 | 122 | } |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | // Normalize column and search parameters |
| 154 | 154 | return array_filter( |
| 155 | 155 | array_map('trim', (is_array($column) ? $column : (array)$column)), |
| 156 | - static fn (string $value): bool => trim($value) !== '' |
|
| 156 | + static fn(string $value) : bool => trim($value) !== '' |
|
| 157 | 157 | ); |
| 158 | 158 | } |
| 159 | 159 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | return array_unique( |
| 172 | 172 | array_filter( |
| 173 | 173 | array_map('trim', (is_array($search) ? $search : explode(' ', (string)$search))), |
| 174 | - static fn (string $value): bool => trim($value) !== '' |
|
| 174 | + static fn(string $value) : bool => trim($value) !== '' |
|
| 175 | 175 | ) |
| 176 | 176 | ); |
| 177 | 177 | } |
@@ -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/ControllerCollection.php |
| 5 | 5 | * |
@@ -50,6 +50,6 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | public function filter(string $className): Closure |
| 52 | 52 | { |
| 53 | - return static fn (ControllerInterface $restController): bool => $restController instanceof $className; |
|
| 53 | + return static fn(ControllerInterface $restController): bool => $restController instanceof $className; |
|
| 54 | 54 | } |
| 55 | 55 | } |
@@ -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 | * |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | |
| 71 | 71 | public function getVisited(): array |
| 72 | 72 | { |
| 73 | - return array_filter($this->visited, static fn (string $property): bool => $property !== 'id'); |
|
| 73 | + return array_filter($this->visited, static fn(string $property): bool => $property !== 'id'); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | public function setVisited(string $property): RestDtoInterface |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | 'has' . ucfirst($property), |
| 145 | 145 | ]; |
| 146 | 146 | |
| 147 | - $getterMethods = array_filter($getters, static fn (string $method): bool => method_exists($dto, $method)); |
|
| 147 | + $getterMethods = array_filter($getters, static fn(string $method): bool => method_exists($dto, $method)); |
|
| 148 | 148 | |
| 149 | 149 | return $this->validateGetterMethod($property, $getterMethods); |
| 150 | 150 | } |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * /src/Form/DataTransformer/UserGroupTransformer.php |
| 5 | 5 | * |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $output = []; |
| 50 | 50 | |
| 51 | 51 | if (is_array($userGroups)) { |
| 52 | - $iterator = static fn ($group): string => $group instanceof UserGroup ? $group->getId() : (string)$group; |
|
| 52 | + $iterator = static fn($group): string => $group instanceof UserGroup ? $group->getId() : (string)$group; |
|
| 53 | 53 | |
| 54 | 54 | $output = array_values(array_map('\strval', array_map($iterator, $userGroups))); |
| 55 | 55 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * /src/Controller/Profile/RolesController.php |
| 5 | 5 | * |