From ade6979785bb799e08912f3104959fb169739462 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 23 Jul 2021 17:40:29 +0200 Subject: [PATCH 1/2] [4.4] Add missing `@return` annotations --- Chunk/ErrorChunk.php | 3 +++ CurlHttpClient.php | 3 +++ HttplugClient.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Chunk/ErrorChunk.php b/Chunk/ErrorChunk.php index 5e2ba0a..7ea5510 100644 --- a/Chunk/ErrorChunk.php +++ b/Chunk/ErrorChunk.php @@ -115,6 +115,9 @@ public function didThrow(): bool return $this->didThrow; } + /** + * @return array + */ public function __sleep() { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); diff --git a/CurlHttpClient.php b/CurlHttpClient.php index 25e517a..c682854 100644 --- a/CurlHttpClient.php +++ b/CurlHttpClient.php @@ -362,6 +362,9 @@ public function reset() } } + /** + * @return array + */ public function __sleep() { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); diff --git a/HttplugClient.php b/HttplugClient.php index a825c5d..d6f53be 100644 --- a/HttplugClient.php +++ b/HttplugClient.php @@ -218,6 +218,9 @@ public function createUri($uri): UriInterface throw new \LogicException(sprintf('You cannot use "%s()" as the "nyholm/psr7" package is not installed. Try running "composer require nyholm/psr7".', __METHOD__)); } + /** + * @return array + */ public function __sleep() { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); From 3cdde24b4320c9b2317d78ef9f29b7e82aae3aed Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 23 Jul 2021 17:40:29 +0200 Subject: [PATCH 2/2] [5.2] Add missing `@return` annotations --- Response/AmpResponse.php | 3 +++ Response/CommonResponseTrait.php | 3 +++ Response/TraceableResponse.php | 3 +++ 3 files changed, 9 insertions(+) diff --git a/Response/AmpResponse.php b/Response/AmpResponse.php index 1c81d0b..27ba36b 100644 --- a/Response/AmpResponse.php +++ b/Response/AmpResponse.php @@ -142,6 +142,9 @@ public function getInfo(string $type = null) return null !== $type ? $this->info[$type] ?? null : $this->info; } + /** + * @return array + */ public function __sleep() { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); diff --git a/Response/CommonResponseTrait.php b/Response/CommonResponseTrait.php index 69c0fa9..f3c8e14 100644 --- a/Response/CommonResponseTrait.php +++ b/Response/CommonResponseTrait.php @@ -127,6 +127,9 @@ public function toStream(bool $throw = true) return $stream; } + /** + * @return array + */ public function __sleep() { throw new \BadMethodCallException('Cannot serialize '.__CLASS__); diff --git a/Response/TraceableResponse.php b/Response/TraceableResponse.php index 34edee2..3b598df 100644 --- a/Response/TraceableResponse.php +++ b/Response/TraceableResponse.php @@ -44,6 +44,9 @@ public function __construct(HttpClientInterface $client, ResponseInterface $resp $this->event = $event; } + /** + * @return array + */ public function __sleep() { throw new \BadMethodCallException('Cannot serialize '.__CLASS__);