88use Fig \Http \Message \StatusCodeInterface ;
99use GuzzleHttp \Psr7 \Utils ;
1010use Psr \Http \Message \ResponseInterface ;
11+ use Psr \Http \Message \StreamInterface ;
1112use React \EventLoop ;
1213use React \Http \Io \HttpBodyStream ;
1314use React \Http \Message \ResponseException ;
@@ -562,7 +563,12 @@ private function curlTick(): void
562563 }
563564 }
564565
565- private function resolveResponse ($ mh , $ curl ): ResponseInterface
566+ /**
567+ * @param CurlMultiHandle $mh
568+ * @param CurlHandle $curl
569+ * @return ResponseInterface
570+ */
571+ private function resolveResponse (CurlMultiHandle $ mh , CurlHandle $ curl ): ResponseInterface
566572 {
567573 $ responseBody = $ this ->inProgress [$ mh ]->file ;
568574 if (is_resource ($ responseBody )) {
@@ -579,7 +585,13 @@ private function resolveResponse($mh, $curl): ResponseInterface
579585 return $ this ->constructResponseFromCurl ($ curl , $ headers , $ responseBody );
580586 }
581587
582- private function constructResponseFromCurl (CurlHandle $ curl , string $ rawHeaders , $ body ) : ResponseInterface {
588+ /**
589+ * @param CurlHandle $curl
590+ * @param string $rawHeaders
591+ * @param ThroughStream|StreamInterface $body
592+ * @return ResponseInterface
593+ */
594+ private function constructResponseFromCurl (CurlHandle $ curl , string $ rawHeaders , ThroughStream |StreamInterface $ body ) : ResponseInterface {
583595 $ redirectCount = curl_getinfo ($ curl , CURLINFO_REDIRECT_COUNT );
584596 $ headers = [];
585597 $ lines = preg_split ('/( \\r? \\n)/ ' , trim ($ rawHeaders ), -1 );
0 commit comments