@@ -27,7 +27,8 @@ |
||
27 | 27 | * @param bool $useSlimErrors Throw Slim exceptions for error responses. |
28 | 28 | */ |
29 | 29 | public function __construct(public bool $useSlimErrors = false) |
30 | - { } |
|
30 | + { |
|
31 | +} |
|
31 | 32 | |
32 | 33 | public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |
33 | 34 | { |
@@ -23,7 +23,7 @@ |
||
23 | 23 | * Run a set of guards. |
24 | 24 | */ |
25 | 25 | public function guard( |
26 | - \ReflectionObject|\ReflectionMethod $subject, |
|
26 | + \ReflectionObject | \ReflectionMethod $subject, |
|
27 | 27 | ServerRequestInterface $request, |
28 | 28 | ResponseInterface $response, |
29 | 29 | ): ?ResponseInterface { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | return $this->guardian; |
20 | 20 | } |
21 | 21 | |
22 | - protected function guard(\ReflectionObject|\ReflectionMethod $subject): ?ResponseInterface |
|
22 | + protected function guard(\ReflectionObject | \ReflectionMethod $subject): ?ResponseInterface |
|
23 | 23 | { |
24 | 24 | return $this->getGuardian()->guard($subject, $this->getRequest(), $this->getResponse()); |
25 | 25 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * |
25 | 25 | * @return $this |
26 | 26 | */ |
27 | - protected function header(string $header, string|int|\Stringable $value, bool $add = false): static |
|
27 | + protected function header(string $header, string | int | \Stringable $value, bool $add = false): static |
|
28 | 28 | { |
29 | 29 | $response = $add |
30 | 30 | ? $this->getResponse()->withAddedHeader($header, (string)$value) |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * @param int|string $status |
48 | 48 | * @return $this |
49 | 49 | */ |
50 | - protected function status(int|string $status): static |
|
50 | + protected function status(int | string $status): static |
|
51 | 51 | { |
52 | 52 | if (is_string($status)) { |
53 | 53 | [$status, $phrase] = explode(' ', $status, 2) + [1 => '']; |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @param string $url |
135 | 135 | * @param int|string $status 301 (Moved Permanently), 302 (Found), 303 (See Other) or 307 (Temporary Redirect) |
136 | 136 | */ |
137 | - protected function redirect(string $url, int|string $status = 303): static |
|
137 | + protected function redirect(string $url, int | string $status = 303): static |
|
138 | 138 | { |
139 | 139 | if ($status < 300 || $status >= 400) { |
140 | 140 | throw new \DomainException("Invalid status code $status for redirect"); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | { |
14 | 14 | abstract protected function getRequest(): ServerRequestInterface; |
15 | 15 | |
16 | - abstract protected function header(string $header, string|int|\Stringable $value, bool $add = false): static; |
|
16 | + abstract protected function header(string $header, string | int | \Stringable $value, bool $add = false): static; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Pick best content type |