Skip to content

Make sure we check for PSR client #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 21, 2019
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
3 changes: 1 addition & 2 deletions src/HttpClientRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

use Http\Client\Common\Exception\HttpClientNoMatchException;
use Http\Client\HttpAsyncClient;
use Http\Client\HttpClient;
use Http\Message\RequestMatcher;
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;
Expand Down Expand Up @@ -43,7 +42,7 @@ public function sendAsyncRequest(RequestInterface $request)
/**
* Add a client to the router.
*
* @param HttpClient|HttpAsyncClient $client
* @param ClientInterface|HttpAsyncClient $client
*/
public function addClient($client, RequestMatcher $requestMatcher): void
{
Expand Down
2 changes: 1 addition & 1 deletion src/PluginClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function __construct($client, array $plugins = [], array $options = [])
public function sendRequest(RequestInterface $request): ResponseInterface
{
// If we don't have an http client, use the async call
if (!($this->client instanceof HttpClient)) {
if (!($this->client instanceof ClientInterface)) {
return $this->sendAsyncRequest($request)->wait();
}

Expand Down