Skip to content

Commit

Permalink
Expect a PSR-18 client instead of a PHP-HTTP client (#1110)
Browse files Browse the repository at this point in the history
* Expect a PSR-18 client instead of a PHP-HTTP client

* Update integration tests
  • Loading branch information
JaZo authored Jul 30, 2022
1 parent 4443a1e commit b848a60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions PickPoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Geocoder\Query\ReverseQuery;
use Geocoder\Http\Provider\AbstractHttpProvider;
use Geocoder\Provider\Provider;
use Http\Client\HttpClient;
use Psr\Http\Client\ClientInterface;

/**
* @author Vladimir Kalinkin <[email protected]>
Expand All @@ -40,10 +40,10 @@ final class PickPoint extends AbstractHttpProvider implements Provider
private $apiKey;

/**
* @param HttpClient $client an HTTP adapter
* @param string $apiKey an API key
* @param ClientInterface $client an HTTP adapter
* @param string $apiKey an API key
*/
public function __construct(HttpClient $client, string $apiKey)
public function __construct(ClientInterface $client, string $apiKey)
{
if (empty($apiKey)) {
throw new InvalidCredentials('No API key provided.');
Expand Down
4 changes: 2 additions & 2 deletions Tests/IntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@

use Geocoder\IntegrationTest\ProviderIntegrationTest;
use Geocoder\Provider\PickPoint\PickPoint;
use Http\Client\HttpClient;
use Psr\Http\Client\ClientInterface;

/**
* @author Vladimir Kalinkin <[email protected]>
*/
class IntegrationTest extends ProviderIntegrationTest
{
protected function createProvider(HttpClient $httpClient)
protected function createProvider(ClientInterface $httpClient)
{
return new PickPoint($httpClient, $this->getApiKey());
}
Expand Down

0 comments on commit b848a60

Please sign in to comment.