@@ -28,17 +28,14 @@ class Response
2828 */
2929 protected $ curlInfo = [];
3030
31- /**
32- * @var mixed
33- */
3431 protected $ httpVersion ;
3532
3633 /**
3734 * @param string|array<string, string> $status
3835 * @param array<string,string> $headers
3936 * @param array<string,mixed> $curlInfo
4037 */
41- final public function __construct ($ status , array $ headers = [], ? string $ body = null , array $ curlInfo = [])
38+ final public function __construct ($ status , array $ headers = [], string $ body = null , array $ curlInfo = [])
4239 {
4340 $ this ->setStatus ($ status );
4441 $ this ->headers = $ headers ;
@@ -57,11 +54,9 @@ public function toArray(): array
5754 // Base64 encode when binary
5855 if (
5956 null !== $ this ->getContentType ()
60- &&
61- (
57+ && (
6258 str_contains ($ this ->getContentType (), 'application/x-gzip ' )
63- ||
64- 'binary ' == $ this ->getHeader ('Content-Transfer-Encoding ' )
59+ || 'binary ' == $ this ->getHeader ('Content-Transfer-Encoding ' )
6560 )
6661 ) {
6762 $ body = base64_encode ($ body );
@@ -118,7 +113,7 @@ public function getBody(): string
118113 /**
119114 * @return array<string,mixed>|mixed|null
120115 */
121- public function getCurlInfo (? string $ option = null )
116+ public function getCurlInfo (string $ option = null )
122117 {
123118 if (empty ($ option )) {
124119 return $ this ->curlInfo ;
@@ -157,9 +152,6 @@ public function getHeader(string $key): ?string
157152 return $ this ->headers [$ key ];
158153 }
159154
160- /**
161- * @return mixed
162- */
163155 public function getHttpVersion ()
164156 {
165157 return $ this ->httpVersion ;
0 commit comments