@@ -124,12 +124,12 @@ |
||
124 | 124 | |
125 | 125 | // @codeCoverageIgnoreStart |
126 | 126 | $msg = 'No system CA bundle could be found in any of the the common system locations. ' |
127 | - .'In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle via ' |
|
128 | - .'HTTPOptions::$ca_info or HTTPOptions::$curl_options. If you do not need a specific certificate bundle, ' |
|
129 | - .'then you can download a CA bundle over here: https://curl.haxx.se/docs/caextract.html. ' |
|
130 | - .'Once you have a CA bundle available on disk, you can set the "curl.cainfo" php.ini setting to point ' |
|
131 | - .'to the path of the file, allowing you to omit the $ca_info or $curl_options setting. ' |
|
132 | - .'See http://curl.haxx.se/docs/sslcerts.html for more information.'; |
|
127 | + .'In order to verify peer certificates, you will need to supply the path on disk to a certificate bundle via ' |
|
128 | + .'HTTPOptions::$ca_info or HTTPOptions::$curl_options. If you do not need a specific certificate bundle, ' |
|
129 | + .'then you can download a CA bundle over here: https://curl.haxx.se/docs/caextract.html. ' |
|
130 | + .'Once you have a CA bundle available on disk, you can set the "curl.cainfo" php.ini setting to point ' |
|
131 | + .'to the path of the file, allowing you to omit the $ca_info or $curl_options setting. ' |
|
132 | + .'See http://curl.haxx.se/docs/sslcerts.html for more information.'; |
|
133 | 133 | |
134 | 134 | throw new ClientException($msg); |
135 | 135 | // @codeCoverageIgnoreEnd |
@@ -173,7 +173,7 @@ |
||
173 | 173 | /** |
174 | 174 | * @inheritDoc |
175 | 175 | */ |
176 | - public function getSize():?int{ |
|
176 | + public function getSize(): ?int{ |
|
177 | 177 | return $this->stream->getSize() + strlen($this->boundary) + 6; |
178 | 178 | } |
179 | 179 |
@@ -130,7 +130,7 @@ |
||
130 | 130 | /** |
131 | 131 | * @inheritDoc |
132 | 132 | */ |
133 | - public function getSize():?int{ |
|
133 | + public function getSize(): ?int{ |
|
134 | 134 | |
135 | 135 | if($this->size !== null){ |
136 | 136 | return $this->size; |
@@ -100,7 +100,7 @@ |
||
100 | 100 | * @inheritDoc |
101 | 101 | * @codeCoverageIgnore |
102 | 102 | */ |
103 | - public function getSize():?int{ |
|
103 | + public function getSize(): ?int{ |
|
104 | 104 | return $this->stream->getSize(); |
105 | 105 | } |
106 | 106 |
@@ -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 | } |
@@ -17,7 +17,7 @@ discard block |
||
17 | 17 | use InvalidArgumentException, RuntimeException; |
18 | 18 | |
19 | 19 | use function chillerlan\HTTP\Psr17\create_stream_from_input; |
20 | -use function in_array, is_file, is_string, is_writable, move_uploaded_file, php_sapi_name,rename; |
|
20 | +use function in_array, is_file, is_string, is_writable, move_uploaded_file, php_sapi_name, rename; |
|
21 | 21 | |
22 | 22 | use const UPLOAD_ERR_CANT_WRITE, UPLOAD_ERR_EXTENSION, UPLOAD_ERR_FORM_SIZE, UPLOAD_ERR_INI_SIZE, |
23 | 23 | UPLOAD_ERR_NO_FILE, UPLOAD_ERR_NO_TMP_DIR, UPLOAD_ERR_OK, UPLOAD_ERR_PARTIAL; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | /** |
162 | 162 | * @inheritDoc |
163 | 163 | */ |
164 | - public function getSize():?int{ |
|
164 | + public function getSize(): ?int{ |
|
165 | 165 | return $this->size; |
166 | 166 | } |
167 | 167 | |
@@ -175,14 +175,14 @@ discard block |
||
175 | 175 | /** |
176 | 176 | * @inheritDoc |
177 | 177 | */ |
178 | - public function getClientFilename():?string{ |
|
178 | + public function getClientFilename(): ?string{ |
|
179 | 179 | return $this->clientFilename; |
180 | 180 | } |
181 | 181 | |
182 | 182 | /** |
183 | 183 | * @inheritDoc |
184 | 184 | */ |
185 | - public function getClientMediaType():?string{ |
|
185 | + public function getClientMediaType(): ?string{ |
|
186 | 186 | return $this->clientMediaType; |
187 | 187 | } |
188 | 188 |
@@ -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( |
@@ -153,7 +153,7 @@ |
||
153 | 153 | CURLOPT_URL => (string)$this->request->getUri()->withFragment(''), |
154 | 154 | CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_2TLS, |
155 | 155 | CURLOPT_USERAGENT => $this->options->user_agent, |
156 | - CURLOPT_PROTOCOLS => CURLPROTO_HTTP | CURLPROTO_HTTPS, |
|
156 | + CURLOPT_PROTOCOLS => CURLPROTO_HTTP|CURLPROTO_HTTPS, |
|
157 | 157 | CURLOPT_SSL_VERIFYPEER => true, |
158 | 158 | CURLOPT_SSL_VERIFYHOST => 2, |
159 | 159 | CURLOPT_CAINFO => $this->options->ca_info, |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @return array |
39 | 39 | */ |
40 | 40 | public static function cleanParams(iterable $params, int $bool_cast = null, bool $remove_empty = null):array{ |
41 | - $bool_cast ??= self::BOOLEANS_AS_BOOL; |
|
41 | + $bool_cast ??= self::BOOLEANS_AS_BOOL; |
|
42 | 42 | $remove_empty ??= true; |
43 | 43 | |
44 | 44 | $cleaned = []; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | return ''; |
103 | 103 | } |
104 | 104 | |
105 | - $encoding ??= PHP_QUERY_RFC3986; |
|
105 | + $encoding ??= PHP_QUERY_RFC3986; |
|
106 | 106 | $enclosure ??= ''; |
107 | 107 | $delimiter ??= '&'; |
108 | 108 |