diff --git a/src/FlexibleHttpClient.php b/src/FlexibleHttpClient.php index 3979868..d6f1862 100644 --- a/src/FlexibleHttpClient.php +++ b/src/FlexibleHttpClient.php @@ -25,7 +25,7 @@ final class FlexibleHttpClient implements HttpClient, HttpAsyncClient public function __construct($client) { if (!($client instanceof ClientInterface) && !($client instanceof HttpAsyncClient)) { - throw new \LogicException('Client must be an instance of Psr\\Http\\Client\\ClientInterface or Http\\Client\\HttpAsyncClient'); + throw new \LogicException(sprintf('Client must be an instance of %s or %s', ClientInterface::class, HttpAsyncClient::class)); } $this->httpClient = $client; diff --git a/src/PluginClient.php b/src/PluginClient.php index 696d3ef..a3a4023 100644 --- a/src/PluginClient.php +++ b/src/PluginClient.php @@ -60,7 +60,7 @@ public function __construct($client, array $plugins = [], array $options = []) } elseif ($client instanceof ClientInterface) { $this->client = new EmulatedHttpAsyncClient($client); } else { - throw new \RuntimeException('Client must be an instance of Psr\\Http\\Client\\ClientInterface or Http\\Client\\HttpAsyncClient'); + throw new \LogicException(sprintf('Client must be an instance of %s or %s', ClientInterface::class, HttpAsyncClient::class)); } $this->plugins = $plugins;