@@ -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 | |
@@ -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 | |
@@ -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 | |
@@ -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 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function enrichOperation( |
| 48 | 48 | RouteInterface $route, |
| 49 | - ReflectionClass|ReflectionMethod $requestHandler, |
|
| 49 | + ReflectionClass | ReflectionMethod $requestHandler, |
|
| 50 | 50 | array &$operation, |
| 51 | 51 | ): void { |
| 52 | 52 | $variables = RouteParser::parseRoute($route->getPath()); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | $variableSchema = $this->getRequestVariableSchema($requestHandler, $variableName); |
| 63 | 63 | $variableSchema ??= ['type' => Type::OAS_TYPE_NAME_STRING]; |
| 64 | - $variableSchema['pattern'] = '^' . $variablePattern . '$'; |
|
| 64 | + $variableSchema['pattern'] = '^'.$variablePattern.'$'; |
|
| 65 | 65 | |
| 66 | 66 | $operation['parameters'][] = [ |
| 67 | 67 | 'in' => 'path', |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @return array<array-key, mixed>|null |
| 85 | 85 | */ |
| 86 | 86 | private function getRequestVariableSchema( |
| 87 | - ReflectionClass|ReflectionMethod $requestHandler, |
|
| 87 | + ReflectionClass | ReflectionMethod $requestHandler, |
|
| 88 | 88 | string $variableName, |
| 89 | 89 | ): ?array { |
| 90 | 90 | 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 | |
@@ -52,6 +52,6 @@ |
||
| 52 | 52 | |
| 53 | 53 | public function getTemporaryDocumentFilename(): string |
| 54 | 54 | { |
| 55 | - return sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'openapi'; |
|
| 55 | + return sys_get_temp_dir().DIRECTORY_SEPARATOR.'openapi'; |
|
| 56 | 56 | } |
| 57 | 57 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | */ |
| 65 | 65 | public function resolveParameter(ReflectionParameter $parameter, mixed $context): Generator |
| 66 | 66 | { |
| 67 | - if (! $context instanceof ServerRequestInterface) { |
|
| 67 | + if (!$context instanceof ServerRequestInterface) { |
|
| 68 | 68 | return; |
| 69 | 69 | } |
| 70 | 70 | |
@@ -88,8 +88,8 @@ discard block |
||
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | throw new InvalidArgumentException(sprintf( |
| 91 | - 'The parameter "%s" expects a value of the variable {%s} from the route "%s", ' . |
|
| 92 | - 'which is not present in the request, likely because the variable is optional. ' . |
|
| 91 | + 'The parameter "%s" expects a value of the variable {%s} from the route "%s", '. |
|
| 92 | + 'which is not present in the request, likely because the variable is optional. '. |
|
| 93 | 93 | 'To resolve this issue, assign the default value to the parameter.', |
| 94 | 94 | ParameterResolverChain::stringifyParameter($parameter), |
| 95 | 95 | $variableName, |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | */ |
| 59 | 59 | public function resolveParameter(ReflectionParameter $parameter, mixed $context): Generator |
| 60 | 60 | { |
| 61 | - if (! $context instanceof ServerRequestInterface) { |
|
| 61 | + if (!$context instanceof ServerRequestInterface) { |
|
| 62 | 62 | return; |
| 63 | 63 | } |
| 64 | 64 | |