@@ -24,7 +24,7 @@ |
||
| 24 | 24 | /** |
| 25 | 25 | * @param string|array<array-key, string> $method |
| 26 | 26 | */ |
| 27 | - public function __construct(string $name, string $path = '', string|array $method = []) |
|
| 27 | + public function __construct(string $name, string $path = '', string | array $method = []) |
|
| 28 | 28 | { |
| 29 | 29 | parent::__construct(name: $name, path: $path, methods: (array) $method, isApiRoute: true); |
| 30 | 30 | } |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | return $this; |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | - final public function addHeaderField(string $fieldName, string|Stringable ...$fieldValues): static |
|
| 98 | + final public function addHeaderField(string $fieldName, string | Stringable ...$fieldValues): static |
|
| 99 | 99 | { |
| 100 | 100 | // https://datatracker.ietf.org/doc/html/rfc7230#section-7 |
| 101 | 101 | $fieldValue = implode(', ', $fieldValues); |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | $this->openApiDocumentManager->buildDocument( |
| 46 | 46 | array_filter( |
| 47 | 47 | $this->router->getRoutes(), |
| 48 | - static function (RouteInterface $route): bool { |
|
| 48 | + static function(RouteInterface $route): bool { |
|
| 49 | 49 | return $route->isApiRoute(); |
| 50 | 50 | }, |
| 51 | 51 | ) |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function enrichOperation( |
| 31 | 31 | RouteInterface $route, |
| 32 | - ReflectionClass|ReflectionMethod $requestHandler, |
|
| 32 | + ReflectionClass | ReflectionMethod $requestHandler, |
|
| 33 | 33 | array &$operation, |
| 34 | 34 | ): void; |
| 35 | 35 | |
@@ -137,7 +137,7 @@ |
||
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - array_walk_recursive($operation, function (mixed &$value) use ($requestHandler): void { |
|
| 140 | + array_walk_recursive($operation, function(mixed &$value) use ($requestHandler): void { |
|
| 141 | 141 | if ($value instanceof Type) { |
| 142 | 142 | $value = $this->openApiPhpTypeSchemaResolverManager->resolvePhpTypeSchema($value, $requestHandler); |
| 143 | 143 | } |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | */ |
| 56 | 56 | public function enrichOperation( |
| 57 | 57 | RouteInterface $route, |
| 58 | - ReflectionMethod|ReflectionClass $requestHandler, |
|
| 58 | + ReflectionMethod | ReflectionClass $requestHandler, |
|
| 59 | 59 | array &$operation, |
| 60 | 60 | ): void { |
| 61 | 61 | $this->isOperationEnrichersSorted or $this->sortOperationEnrichers(); |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function enrichOperation( |
| 31 | 31 | RouteInterface $route, |
| 32 | - ReflectionClass|ReflectionMethod $requestHandler, |
|
| 32 | + ReflectionClass | ReflectionMethod $requestHandler, |
|
| 33 | 33 | array &$operation, |
| 34 | 34 | ): void; |
| 35 | 35 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | * @param ReflectionClass<object>|ReflectionMethod $requestHandler |
| 30 | 30 | */ |
| 31 | 31 | final protected static function getResponseStatusCode( |
| 32 | - ReflectionClass|ReflectionMethod $requestHandler, |
|
| 32 | + ReflectionClass | ReflectionMethod $requestHandler, |
|
| 33 | 33 | ): ?int { |
| 34 | 34 | if ($requestHandler instanceof ReflectionMethod) { |
| 35 | 35 | /** @var list<ReflectionAttribute<ResponseStatus>> $annotations */ |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @param-out array<array-key, mixed> $response |
| 51 | 51 | */ |
| 52 | 52 | final protected static function enrichResponseWithHeaders( |
| 53 | - ReflectionClass|ReflectionMethod $requestHandler, |
|
| 53 | + ReflectionClass | ReflectionMethod $requestHandler, |
|
| 54 | 54 | array &$response, |
| 55 | 55 | ): void { |
| 56 | 56 | if ($requestHandler instanceof ReflectionMethod) { |
@@ -43,10 +43,10 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | public function enrichOperation( |
| 45 | 45 | RouteInterface $route, |
| 46 | - ReflectionClass|ReflectionMethod $requestHandler, |
|
| 46 | + ReflectionClass | ReflectionMethod $requestHandler, |
|
| 47 | 47 | array &$operation, |
| 48 | 48 | ): void { |
| 49 | - if (! $requestHandler instanceof ReflectionMethod) { |
|
| 49 | + if (!$requestHandler instanceof ReflectionMethod) { |
|
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | |