@@ -251,7 +251,7 @@ |
||
| 251 | 251 | bool $assoc = false, |
| 252 | 252 | int $depth = 512, |
| 253 | 253 | int $options = 0 |
| 254 | - ): array|object { |
|
| 254 | + ): array | object { |
|
| 255 | 255 | return Json::decode($this->content, $assoc, $depth, $options); |
| 256 | 256 | } |
| 257 | 257 | |
@@ -551,7 +551,7 @@ discard block |
||
| 551 | 551 | protected function send(CurlHandle $ch): HttpResponse |
| 552 | 552 | { |
| 553 | 553 | $responseHeaders = []; |
| 554 | - curl_setopt($ch, CURLOPT_HEADERFUNCTION, function ($curl, $header) use (&$responseHeaders) { |
|
| 554 | + curl_setopt($ch, CURLOPT_HEADERFUNCTION, function($curl, $header) use (&$responseHeaders) { |
|
| 555 | 555 | if (strpos($header, ':') !== false) { |
| 556 | 556 | list($name, $value) = explode(':', $header); |
| 557 | 557 | if (array_key_exists($name, $responseHeaders) === false) { |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | * @param array<mixed>|object|null $body the request body |
| 681 | 681 | * @return void |
| 682 | 682 | */ |
| 683 | - protected function processBody(CurlHandle $ch, array|object|null $body = null): void |
|
| 683 | + protected function processBody(CurlHandle $ch, array | object | null $body = null): void |
|
| 684 | 684 | { |
| 685 | 685 | if ($body === null) { |
| 686 | 686 | return; |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | * {@inheritdoc} |
| 141 | 141 | * @return $this |
| 142 | 142 | */ |
| 143 | - public function withHeader(string $name, string|array $value): self |
|
| 143 | + public function withHeader(string $name, string | array $value): self |
|
| 144 | 144 | { |
| 145 | 145 | $that = clone $this; |
| 146 | 146 | $lowerName = strtolower($name); |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | /** |
| 153 | 153 | * {@inheritdoc} |
| 154 | 154 | */ |
| 155 | - public function withAddedHeader(string $name, string|array $value): self |
|
| 155 | + public function withAddedHeader(string $name, string | array $value): self |
|
| 156 | 156 | { |
| 157 | 157 | $that = clone $this; |
| 158 | 158 | $lowerName = strtolower($name); |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | */ |
| 81 | 81 | public function __construct( |
| 82 | 82 | string $method = 'GET', |
| 83 | - UriInterface|string|null $uri = null |
|
| 83 | + UriInterface | string | null $uri = null |
|
| 84 | 84 | ) { |
| 85 | 85 | $this->method = $this->filterMethod($method); |
| 86 | 86 | if ($uri === null) { |
@@ -516,7 +516,7 @@ discard block |
||
| 516 | 516 | |
| 517 | 517 | return (string) preg_replace_callback( |
| 518 | 518 | '/(?:[^a-zA-Z0-9\-._~!$&\'()*+,;=:@\/%]++|%(?![a-fA-F0-9]{2}))/', |
| 519 | - function ($matches) { |
|
| 519 | + function($matches) { |
|
| 520 | 520 | return rawurlencode($matches[0]); |
| 521 | 521 | }, |
| 522 | 522 | $path |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | |
| 548 | 548 | return (string) preg_replace_callback( |
| 549 | 549 | '/(?:[^a-zA-Z0-9\-._~!$&\'()*+,;=:@\/?%]++|%(?![a-fA-F0-9]{2}))/', |
| 550 | - function ($matches) { |
|
| 550 | + function($matches) { |
|
| 551 | 551 | return rawurlencode($matches[0]); |
| 552 | 552 | }, |
| 553 | 553 | $query |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | if ($fragment !== '') { |
| 568 | 568 | return (string) preg_replace_callback( |
| 569 | 569 | '/(?:[^a-zA-Z0-9\-._~!$&\'()*+,;=:@\/?%]++|%(?![a-fA-F0-9]{2}))/', |
| 570 | - function ($matches) { |
|
| 570 | + function($matches) { |
|
| 571 | 571 | return rawurlencode($matches[0]); |
| 572 | 572 | }, |
| 573 | 573 | $fragment |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * The parse body content |
| 85 | 85 | * @var object|array<string, mixed>|null |
| 86 | 86 | */ |
| 87 | - protected object|array|null $parsedBody; |
|
| 87 | + protected object | array | null $parsedBody; |
|
| 88 | 88 | |
| 89 | 89 | /** |
| 90 | 90 | * The array of request attributes |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function __construct( |
| 102 | 102 | string $method = 'GET', |
| 103 | - UriInterface|string|null $uri = null, |
|
| 103 | + UriInterface | string | null $uri = null, |
|
| 104 | 104 | array $serverParams = [] |
| 105 | 105 | ) { |
| 106 | 106 | $this->serverParams = $serverParams; |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | /** |
| 226 | 226 | * {@inheritdoc} |
| 227 | 227 | */ |
| 228 | - public function getParsedBody(): array|object|null |
|
| 228 | + public function getParsedBody(): array | object | null |
|
| 229 | 229 | { |
| 230 | 230 | return $this->parsedBody; |
| 231 | 231 | } |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | /** |
| 234 | 234 | * {@inheritdoc} |
| 235 | 235 | */ |
| 236 | - public function withParsedBody(array|object|null $data): self |
|
| 236 | + public function withParsedBody(array | object | null $data): self |
|
| 237 | 237 | { |
| 238 | 238 | $that = clone $this; |
| 239 | 239 | $that->parsedBody = $data; |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | * @param string|null $clientMediaType |
| 109 | 109 | */ |
| 110 | 110 | public function __construct( |
| 111 | - string|StreamInterface $filenameOrStream, |
|
| 111 | + string | StreamInterface $filenameOrStream, |
|
| 112 | 112 | ?int $size = null, |
| 113 | 113 | int $error = UPLOAD_ERR_OK, |
| 114 | 114 | ?string $clientFilename = null, |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | * @return $this |
| 180 | 180 | * @throws InvalidArgumentException for invalid header names or values. |
| 181 | 181 | */ |
| 182 | - public function withHeader(string $name, string|array $value): self; |
|
| 182 | + public function withHeader(string $name, string | array $value): self; |
|
| 183 | 183 | |
| 184 | 184 | /** |
| 185 | 185 | * Return an instance with the specified header appended with the given value. |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | * @throws InvalidArgumentException for invalid header names. |
| 199 | 199 | * @throws InvalidArgumentException for invalid header values. |
| 200 | 200 | */ |
| 201 | - public function withAddedHeader(string $name, string|array $value): self; |
|
| 201 | + public function withAddedHeader(string $name, string | array $value): self; |
|
| 202 | 202 | |
| 203 | 203 | /** |
| 204 | 204 | * Return an instance without the specified header. |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | * @return null|array<string, mixed>|object The deserialized body parameters, if any. |
| 220 | 220 | * These will typically be an array or object. |
| 221 | 221 | */ |
| 222 | - public function getParsedBody(): array|object|null; |
|
| 222 | + public function getParsedBody(): array | object | null; |
|
| 223 | 223 | |
| 224 | 224 | /** |
| 225 | 225 | * Return an instance with the specified body parameters. |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | * @throws InvalidArgumentException if an unsupported argument type is |
| 252 | 252 | * provided. |
| 253 | 253 | */ |
| 254 | - public function withParsedBody(array|object|null $data): self; |
|
| 254 | + public function withParsedBody(array | object | null $data): self; |
|
| 255 | 255 | |
| 256 | 256 | /** |
| 257 | 257 | * Retrieve attributes derived from the request. |