diff --git a/src/Client.php b/src/Client.php index f2bb184..ae5cfe3 100644 --- a/src/Client.php +++ b/src/Client.php @@ -240,7 +240,7 @@ private function createCurlOptions(RequestInterface $request, ResponseBuilder $r * * @return int */ - private function getProtocolVersion($requestVersion) + private function getProtocolVersion(string $requestVersion): int { switch ($requestVersion) { case '1.0': @@ -265,7 +265,7 @@ private function getProtocolVersion($requestVersion) * * @return array */ - private function addRequestBodyOptions(RequestInterface $request, array $options) + private function addRequestBodyOptions(RequestInterface $request, array $options): array { /* * Some HTTP methods cannot have payload: @@ -319,7 +319,7 @@ private function addRequestBodyOptions(RequestInterface $request, array $options * * @return string[] */ - private function createHeaders(RequestInterface $request, array $options) + private function createHeaders(RequestInterface $request, array $options): array { $curlHeaders = []; $headers = $request->getHeaders(); @@ -358,7 +358,7 @@ private function createHeaders(RequestInterface $request, array $options) * * @throws \RuntimeException If creating the stream from $body fails */ - private function createResponseBuilder() + private function createResponseBuilder(): ResponseBuilder { try { $body = $this->streamFactory->createStream(fopen('php://temp', 'w+b')); diff --git a/src/CurlPromise.php b/src/CurlPromise.php index 5061af5..f04ccf6 100644 --- a/src/CurlPromise.php +++ b/src/CurlPromise.php @@ -1,5 +1,7 @@