@@ -32,6 +32,6 @@ |
||
32 | 32 | * @return \Psr\Http\Message\RequestInterface|null an optional replacement request if the previous request failed |
33 | 33 | * @internal |
34 | 34 | */ |
35 | - public function handleResponse(ResponseInterface $response, RequestInterface $request, int $id, array $curl_info):?RequestInterface; |
|
35 | + public function handleResponse(ResponseInterface $response, RequestInterface $request, int $id, array $curl_info): ?RequestInterface; |
|
36 | 36 | |
37 | 37 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | /** |
44 | 44 | * |
45 | 45 | */ |
46 | - public function getID():?int{ |
|
46 | + public function getID(): ?int{ |
|
47 | 47 | return $this->id; |
48 | 48 | } |
49 | 49 | |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | /** |
83 | 83 | * |
84 | 84 | */ |
85 | - public function handleResponse():?RequestInterface{ |
|
85 | + public function handleResponse(): ?RequestInterface{ |
|
86 | 86 | $info = curl_getinfo($this->curl); |
87 | 87 | |
88 | 88 | return $this->multiResponseHandler->handleResponse( |
@@ -166,7 +166,7 @@ |
||
166 | 166 | CURLOPT_URL => (string)$this->request->getUri()->withFragment(''), |
167 | 167 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_2TLS, |
168 | 168 | CURLOPT_USERAGENT => $this->options->user_agent, |
169 | - CURLOPT_PROTOCOLS => CURLPROTO_HTTP | CURLPROTO_HTTPS, |
|
169 | + CURLOPT_PROTOCOLS => CURLPROTO_HTTP|CURLPROTO_HTTPS, |
|
170 | 170 | CURLOPT_REDIR_PROTOCOLS => CURLPROTO_HTTPS, |
171 | 171 | CURLOPT_TIMEOUT => $this->options->timeout, |
172 | 172 | CURLOPT_CONNECTTIMEOUT => 30, |
@@ -170,12 +170,12 @@ |
||
170 | 170 | |
171 | 171 | // @codeCoverageIgnoreStart |
172 | 172 | $msg = 'No system CA bundle could be found in any of the the common system locations. ' |
173 | - .'In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle via ' |
|
174 | - .'HTTPOptions::$ca_info. If you do not need a specific certificate bundle, ' |
|
175 | - .'then you can download a CA bundle over here: https://curl.haxx.se/docs/caextract.html. ' |
|
176 | - .'Once you have a CA bundle available on disk, you can set the "curl.cainfo" php.ini setting to point ' |
|
177 | - .'to the path of the file, allowing you to omit the $ca_info setting. ' |
|
178 | - .'See http://curl.haxx.se/docs/sslcerts.html for more information.'; |
|
173 | + .'In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle via ' |
|
174 | + .'HTTPOptions::$ca_info. If you do not need a specific certificate bundle, ' |
|
175 | + .'then you can download a CA bundle over here: https://curl.haxx.se/docs/caextract.html. ' |
|
176 | + .'Once you have a CA bundle available on disk, you can set the "curl.cainfo" php.ini setting to point ' |
|
177 | + .'to the path of the file, allowing you to omit the $ca_info setting. ' |
|
178 | + .'See http://curl.haxx.se/docs/sslcerts.html for more information.'; |
|
179 | 179 | |
180 | 180 | throw new ClientException($msg); |
181 | 181 | // @codeCoverageIgnoreEnd |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | use Psr\Http\Message\{StreamInterface, UploadedFileInterface}; |
15 | 15 | use InvalidArgumentException, RuntimeException; |
16 | 16 | |
17 | -use function in_array, is_file, is_string, is_writable, move_uploaded_file, php_sapi_name,rename; |
|
17 | +use function in_array, is_file, is_string, is_writable, move_uploaded_file, php_sapi_name, rename; |
|
18 | 18 | |
19 | 19 | use const UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_INI_SIZE, |
20 | 20 | UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_OK, UPLOAD_ERR_PARTIAL; |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | /** |
133 | 133 | * @inheritDoc |
134 | 134 | */ |
135 | - public function getSize():?int{ |
|
135 | + public function getSize(): ?int{ |
|
136 | 136 | return $this->size; |
137 | 137 | } |
138 | 138 | |
@@ -146,14 +146,14 @@ discard block |
||
146 | 146 | /** |
147 | 147 | * @inheritDoc |
148 | 148 | */ |
149 | - public function getClientFilename():?string{ |
|
149 | + public function getClientFilename(): ?string{ |
|
150 | 150 | return $this->clientFilename; |
151 | 151 | } |
152 | 152 | |
153 | 153 | /** |
154 | 154 | * @inheritDoc |
155 | 155 | */ |
156 | - public function getClientMediaType():?string{ |
|
156 | + public function getClientMediaType(): ?string{ |
|
157 | 157 | return $this->clientMediaType; |
158 | 158 | } |
159 | 159 |
@@ -21,7 +21,7 @@ |
||
21 | 21 | class FactoryHelpers{ |
22 | 22 | |
23 | 23 | public const STREAM_MODES_READ_WRITE = [ |
24 | - 'a+', 'c+', 'c+b', 'c+t', 'r+' , 'r+b', 'r+t', 'w+' , 'w+b', 'w+t', 'x+' , 'x+b', 'x+t' |
|
24 | + 'a+', 'c+', 'c+b', 'c+t', 'r+', 'r+b', 'r+t', 'w+', 'w+b', 'w+t', 'x+', 'x+b', 'x+t' |
|
25 | 25 | ]; |
26 | 26 | public const STREAM_MODES_READ = [...self::STREAM_MODES_READ_WRITE, 'r', 'rb', 'rt']; |
27 | 27 | public const STREAM_MODES_WRITE = [...self::STREAM_MODES_READ_WRITE, 'a', 'rw', 'w', 'wb']; |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | * @return int|null |
278 | 278 | * @throws \InvalidArgumentException |
279 | 279 | */ |
280 | - protected function filterPort($port):?int{ |
|
280 | + protected function filterPort($port): ?int{ |
|
281 | 281 | |
282 | 282 | if($port === null){ |
283 | 283 | return null; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | /** |
296 | 296 | * @inheritDoc |
297 | 297 | */ |
298 | - public function getPort():?int{ |
|
298 | + public function getPort(): ?int{ |
|
299 | 299 | return $this->port; |
300 | 300 | } |
301 | 301 | |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | /** @noinspection RegExpRedundantEscape, RegExpUnnecessaryNonCapturingGroup */ |
474 | 474 | return preg_replace_callback( |
475 | 475 | '/(?:[^a-z\d_\-\.~!\$&\'\(\)\*\+,;=%:@\/'.($query ? '\?' : '').']++|%(?![a-f\d]{2}))/i', |
476 | - fn(array $match):string => rawurlencode($match[0]), |
|
476 | + fn(array $match) : string => rawurlencode($match[0]), |
|
477 | 477 | $str |
478 | 478 | ); |
479 | 479 |
@@ -117,7 +117,7 @@ |
||
117 | 117 | /** |
118 | 118 | * @inheritDoc |
119 | 119 | */ |
120 | - public function getSize():?int{ |
|
120 | + public function getSize(): ?int{ |
|
121 | 121 | |
122 | 122 | if(!is_resource($this->stream)){ |
123 | 123 | return null; |