@@ -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 | |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | public function resolveParameter(ReflectionParameter $parameter, mixed $context): Generator |
| 39 | 39 | { |
| 40 | 40 | $type = $parameter->getType(); |
| 41 | - if (! $type instanceof ReflectionNamedType || $type->isBuiltin()) { |
|
| 41 | + if (!$type instanceof ReflectionNamedType || $type->isBuiltin()) { |
|
| 42 | 42 | return; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | { |
| 56 | 56 | $route = $this->request->getAttribute(RouteInterface::class); |
| 57 | 57 | |
| 58 | - if (! $route instanceof RouteInterface) { |
|
| 58 | + if (!$route instanceof RouteInterface) { |
|
| 59 | 59 | // phpcs:ignore Generic.Files.LineLength.TooLong |
| 60 | 60 | throw new LogicException('At this level of the application, the request does not contain information about the requested route.'); |
| 61 | 61 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | // @codeCoverageIgnoreStart |
| 153 | 153 | if (!extension_loaded('intl')) { |
| 154 | 154 | throw new LogicException( |
| 155 | - 'To get the locales consumed by the client, ' . |
|
| 155 | + 'To get the locales consumed by the client, '. |
|
| 156 | 156 | 'the Intl (https://www.php.net/intl) extension must be installed.' |
| 157 | 157 | ); |
| 158 | 158 | } |
@@ -99,7 +99,7 @@ |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | throw new InvalidArgumentException(sprintf( |
| 102 | - 'The "%s" value could not be converted to a string; ' . |
|
| 102 | + 'The "%s" value could not be converted to a string; '. |
|
| 103 | 103 | 'supported types are: string, integer, backed enum and stringable object.', |
| 104 | 104 | get_debug_type($value), |
| 105 | 105 | )); |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | throw new InvalidArgumentException(sprintf( |
| 60 | - 'The route "%s" could not be matched due to: %s. ' . |
|
| 60 | + 'The route "%s" could not be matched due to: %s. '. |
|
| 61 | 61 | 'This problem is most likely related to one of the route patterns.', |
| 62 | 62 | $pattern, |
| 63 | 63 | preg_last_error_msg(), |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | $replace = []; |
| 34 | 34 | foreach ($variables as $variable) { |
| 35 | 35 | $search[] = $variable['statement']; |
| 36 | - $replace[] = '{' . $variable['name'] . '}'; |
|
| 36 | + $replace[] = '{'.$variable['name'].'}'; |
|
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // will be replaced by an empty string: |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | $replace = []; |
| 42 | 42 | foreach ($variables as $variable) { |
| 43 | 43 | $search[] = $variable['statement']; |
| 44 | - $replace[] = '{' . $variable['name'] . '}'; |
|
| 44 | + $replace[] = '{'.$variable['name'].'}'; |
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $route = str_replace($search, $replace, $route); |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | foreach ($variables as $variable) { |
| 54 | 54 | $pattern = $patterns[$variable['name']] ?? $variable['pattern'] ?? self::DEFAULT_VARIABLE_PATTERN; |
| 55 | 55 | |
| 56 | - $search[] = '{' . $variable['name'] . '}'; |
|
| 57 | - $replace[] = '(?<' . $variable['name'] . '>' . $pattern . ')'; |
|
| 56 | + $search[] = '{'.$variable['name'].'}'; |
|
| 57 | + $replace[] = '(?<'.$variable['name'].'>'.$pattern.')'; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | $route = str_replace($search, $replace, $route); |
| 61 | 61 | |
| 62 | - return '#^' . $route . '$#uD'; |
|
| 62 | + return '#^'.$route.'$#uD'; |
|
| 63 | 63 | } |
| 64 | 64 | } |