@@ -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/RepositoryHelper.php |
| 5 | 5 | * |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public static function processCriteria(QueryBuilder $queryBuilder, ?array $criteria = null): void |
| 89 | 89 | { |
| 90 | - $criteria ??= []; |
|
| 90 | + $criteria ?? = []; |
|
| 91 | 91 | |
| 92 | 92 | if (count($criteria) === 0) { |
| 93 | 93 | return; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | public static function processSearchTerms(QueryBuilder $queryBuilder, array $columns, ?array $terms = null): void |
| 119 | 119 | { |
| 120 | - $terms ??= []; |
|
| 120 | + $terms ?? = []; |
|
| 121 | 121 | |
| 122 | 122 | if (count($columns) === 0) { |
| 123 | 123 | return; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public static function processOrderBy(QueryBuilder $queryBuilder, ?array $orderBy = null): void |
| 143 | 143 | { |
| 144 | - $orderBy ??= []; |
|
| 144 | + $orderBy ?? = []; |
|
| 145 | 145 | |
| 146 | 146 | foreach ($orderBy as $column => $order) { |
| 147 | 147 | if (strpos($column, '.') === false) { |
@@ -368,11 +368,11 @@ discard block |
||
| 368 | 368 | try { |
| 369 | 369 | $value = array_map([UuidHelper::class, 'getBytes'], $value); |
| 370 | 370 | } catch (InvalidUuidStringException $exception) { |
| 371 | - (static fn (Throwable $exception): Throwable => $exception)($exception); |
|
| 371 | + (static fn(Throwable $exception): Throwable => $exception)($exception); |
|
| 372 | 372 | } |
| 373 | 373 | |
| 374 | 374 | $parameters[] = array_map( |
| 375 | - static fn (string $value): Literal => $queryBuilder->expr()->literal(is_numeric($value) |
|
| 375 | + static fn(string $value): Literal => $queryBuilder->expr()->literal(is_numeric($value) |
|
| 376 | 376 | ? (int)$value |
| 377 | 377 | : $value), |
| 378 | 378 | $value |
@@ -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/ResponseHandler.php |
| 5 | 5 | * |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | ); |
| 101 | 101 | |
| 102 | 102 | $groups = array_merge([$entityName], $populate); |
| 103 | - $filter = static fn (string $groupName): bool => strncmp($groupName, 'Set.', 4) === 0; |
|
| 103 | + $filter = static fn(string $groupName): bool => strncmp($groupName, 'Set.', 4) === 0; |
|
| 104 | 104 | |
| 105 | 105 | if (array_key_exists('populateOnly', $request->query->all()) |
| 106 | 106 | || count(array_filter($groups, $filter)) > 0 |
@@ -137,8 +137,8 @@ discard block |
||
| 137 | 137 | ?string $format = null, |
| 138 | 138 | ?array $context = null |
| 139 | 139 | ): Response { |
| 140 | - $httpStatus ??= 200; |
|
| 141 | - $context ??= $this->getSerializeContext($request, $restResource); |
|
| 140 | + $httpStatus ?? = 200; |
|
| 141 | + $context ?? = $this->getSerializeContext($request, $restResource); |
|
| 142 | 142 | $format = $this->getFormat($request, $format); |
| 143 | 143 | |
| 144 | 144 | // Get response |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | if ($populateAll && count($populate) === 0) { |
| 201 | 201 | $associations = $restResource->getAssociations(); |
| 202 | 202 | $populate = array_map( |
| 203 | - static fn (string $assocName): string => $entityName . '.' . $assocName, |
|
| 203 | + static fn(string $assocName): string => $entityName . '.' . $assocName, |
|
| 204 | 204 | $associations |
| 205 | 205 | ); |
| 206 | 206 | } |
@@ -1,5 +1,5 @@ |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * /src/Rest/Traits/RestMethodProcessCriteria.php |
| 5 | 5 | * |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | -declare(strict_types = 1); |
|
| 2 | +declare(strict_types=1); |
|
| 3 | 3 | /** |
| 4 | 4 | * /src/App/Validator/Constraints/EntityReferenceExistsValidator.php |
| 5 | 5 | * |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | private function getInvalidValues(array $entities): array |
| 121 | 121 | { |
| 122 | 122 | return array_map( |
| 123 | - static fn (EntityInterface $entity): string => $entity->getId(), |
|
| 123 | + static fn(EntityInterface $entity): string => $entity->getId(), |
|
| 124 | 124 | array_filter($entities, $this->getFilterClosure()) |
| 125 | 125 | ); |
| 126 | 126 | } |
@@ -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 | * |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * |
| 56 | 56 | * @return string |
| 57 | 57 | */ |
| 58 | - static fn ($userGroup): string => $userGroup instanceof UserGroup ? $userGroup->getId() : $userGroup; |
|
| 58 | + static fn($userGroup): string => $userGroup instanceof UserGroup ? $userGroup->getId() : $userGroup; |
|
| 59 | 59 | |
| 60 | 60 | $output = array_values(array_map('\strval', array_map($iterator, $userGroups))); |
| 61 | 61 | } |
@@ -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/DateDimension.php |
| 5 | 5 | * |
@@ -262,7 +262,7 @@ discard block |
||
| 262 | 262 | array_merge( |
| 263 | 263 | [RolesService::ROLE_API], |
| 264 | 264 | $this->userGroups |
| 265 | - ->map(static fn (UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
| 265 | + ->map(static fn(UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
| 266 | 266 | ->toArray() |
| 267 | 267 | ) |
| 268 | 268 | ) |
@@ -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/UserRelations.php |
| 5 | 5 | * |
@@ -105,7 +105,7 @@ discard block |
||
| 105 | 105 | public function getRoles(): array |
| 106 | 106 | { |
| 107 | 107 | return $this->userGroups |
| 108 | - ->map(static fn (UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
| 108 | + ->map(static fn(UserGroup $userGroup): string => $userGroup->getRole()->getId()) |
|
| 109 | 109 | ->toArray(); |
| 110 | 110 | } |
| 111 | 111 | |
@@ -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 | * |
@@ -512,7 +512,7 @@ discard block |
||
| 512 | 512 | /** @var array<string, mixed> $output */ |
| 513 | 513 | $output = JSON::decode($rawContent, true); |
| 514 | 514 | } catch (JsonException $error) { |
| 515 | - (static fn (Throwable $error): Throwable => $error)($error); |
|
| 515 | + (static fn(Throwable $error): Throwable => $error)($error); |
|
| 516 | 516 | |
| 517 | 517 | // Oh noes content isn't JSON so just parse it |
| 518 | 518 | $output = []; |
@@ -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 | * |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | */ |
| 89 | 89 | public function filter(string $className): Closure |
| 90 | 90 | { |
| 91 | - return static fn (RestResourceInterface $restResource): bool => $restResource instanceof $className; |
|
| 91 | + return static fn(RestResourceInterface $restResource): bool => $restResource instanceof $className; |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | return null; |
| 122 | 122 | } |
| 123 | 123 | |
| 124 | - $callback = static fn (RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName; |
|
| 124 | + $callback = static fn(RestResourceInterface $resource): bool => $resource->getEntityName() === $entityName; |
|
| 125 | 125 | |
| 126 | 126 | $filteredIterator = new CallbackFilterIterator(new IteratorIterator($iterator), $callback); |
| 127 | 127 | $filteredIterator->rewind(); |