From 6800c91fe7a9c7f5b4386c5650250fd35d9ea12a Mon Sep 17 00:00:00 2001 From: Mponos George Date: Sun, 8 Dec 2019 17:01:12 +0200 Subject: [PATCH] Disallow empty response on BadResponseException (#2427) * Disallow empty response on BadResponseException * Fix codestyle * Added return type * Added typehint * Remove error from phpstan baseline --- phpstan-baseline.neon | 5 ----- src/Exception/BadResponseException.php | 18 ++++++++++-------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3658cf56..e59ba763 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -320,11 +320,6 @@ parameters: count: 1 path: src/Exception/BadResponseException.php - - - message: "#^Method GuzzleHttp\\\\Exception\\\\BadResponseException\\:\\:__construct\\(\\) has parameter \\$message with no typehint specified\\.$#" - count: 1 - path: src/Exception/BadResponseException.php - - message: "#^Method GuzzleHttp\\\\Exception\\\\ConnectException\\:\\:__construct\\(\\) has parameter \\$handlerContext with no value type specified in iterable type array\\.$#" count: 1 diff --git a/src/Exception/BadResponseException.php b/src/Exception/BadResponseException.php index 427d896f..bc58902b 100644 --- a/src/Exception/BadResponseException.php +++ b/src/Exception/BadResponseException.php @@ -1,4 +1,5 @@