Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/FlexibleHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/PluginClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down