@@ -133,7 +133,7 @@ |
||
133 | 133 | $instance = parent::withProtocolVersion($version); |
134 | 134 | $instance->options[CURLOPT_HTTP_VERSION] = |
135 | 135 | ['1.1' => CURL_HTTP_VERSION_1_1, |
136 | - '1.0' => CURL_HTTP_VERSION_1_0][$version]; |
|
136 | + '1.0' => CURL_HTTP_VERSION_1_0][$version]; |
|
137 | 137 | return $instance; |
138 | 138 | } |
139 | 139 |
@@ -40,8 +40,8 @@ discard block |
||
40 | 40 | |
41 | 41 | public function __construct( |
42 | 42 | string $method, |
43 | - string|UriInterface $uri, |
|
44 | - string|iterable $body = null, |
|
43 | + string | UriInterface $uri, |
|
44 | + string | iterable $body = null, |
|
45 | 45 | array $headers = []) |
46 | 46 | { |
47 | 47 | parent::__construct($method, $uri, $body, $headers); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | return $instance; |
132 | 132 | } |
133 | 133 | |
134 | - protected function createResource(): \CurlHandle|bool |
|
134 | + protected function createResource(): \CurlHandle | bool |
|
135 | 135 | { |
136 | 136 | return \curl_init((string)$this->getUri()); |
137 | 137 | } |
@@ -41,8 +41,8 @@ |
||
41 | 41 | |
42 | 42 | public function __construct( |
43 | 43 | string $method, |
44 | - string|UriInterface $uri, |
|
45 | - string|iterable $body = null, |
|
44 | + string | UriInterface $uri, |
|
45 | + string | iterable $body = null, |
|
46 | 46 | array $headers = []) |
47 | 47 | { |
48 | 48 | parent::__construct($method, $uri, $body, $headers); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | protected array $attributes = []; |
25 | 25 | protected array $queryParams = []; |
26 | 26 | |
27 | - protected object|array|null $parsedBody = null; |
|
27 | + protected object | array | null $parsedBody = null; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * ServerRequest constructor. |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | return $instance; |
57 | 57 | } |
58 | 58 | |
59 | - public function getParsedBody(): object|array|null |
|
59 | + public function getParsedBody(): object | array | null |
|
60 | 60 | { |
61 | 61 | if ($this->useOnlyPost()) { |
62 | 62 | return $_POST; |
@@ -40,8 +40,8 @@ |
||
40 | 40 | */ |
41 | 41 | public function __construct( |
42 | 42 | string $method, |
43 | - string|UriInterface $uri, |
|
44 | - string|iterable $body = null, |
|
43 | + string | UriInterface $uri, |
|
44 | + string | iterable $body = null, |
|
45 | 45 | array $headers = []) |
46 | 46 | { |
47 | 47 | $this->uri = $uri instanceof UriInterface ? $uri : new Uri($uri); |
@@ -155,7 +155,7 @@ |
||
155 | 155 | * |
156 | 156 | * @return void |
157 | 157 | */ |
158 | - protected function normalizeHeader(string $name, array|string $value, bool $skipKey): void |
|
158 | + protected function normalizeHeader(string $name, array | string $value, bool $skipKey): void |
|
159 | 159 | { |
160 | 160 | $name = \str_replace(["\r", "\n", "\t"], '', \trim($name)); |
161 | 161 | if (false === $skipKey) { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | */ |
22 | 22 | trait ValidatableTrait |
23 | 23 | { |
24 | - public function validate(HttpInputValidator $validator, Data &$input = null): ?Response |
|
24 | + public function validate(HttpInputValidator $validator, Data & $input = null): ?Response |
|
25 | 25 | { |
26 | 26 | $input = new Immutable($this->getParsedBody() ?? []); |
27 | 27 | if (0 === $input->count()) { |
@@ -306,7 +306,7 @@ |
||
306 | 306 | * @return Response|null Should return a NULL if validation has passed, |
307 | 307 | * or a Response object with status code 400 and explanation what failed |
308 | 308 | */ |
309 | - public function validate(HttpInputValidator $validator, Data &$input = null): ?Response; |
|
309 | + public function validate(HttpInputValidator $validator, Data & $input = null): ?Response; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 |