diff --git a/Addok.php b/Addok.php index 61f51f7..24d8e08 100644 --- a/Addok.php +++ b/Addok.php @@ -22,7 +22,7 @@ use Geocoder\Provider\Provider; use Geocoder\Query\GeocodeQuery; use Geocoder\Query\ReverseQuery; -use Http\Client\HttpClient; +use Psr\Http\Client\ClientInterface; /** * @author Jonathan Beliƫn @@ -40,21 +40,21 @@ final class Addok extends AbstractHttpProvider implements Provider private $rootUrl; /** - * @param HttpClient $client - * @param string|null $locale + * @param ClientInterface $client + * @param string|null $locale * * @return Addok */ - public static function withBANServer(HttpClient $client) + public static function withBANServer(ClientInterface $client) { return new self($client, 'https://api-adresse.data.gouv.fr'); } /** - * @param HttpClient $client an HTTP adapter - * @param string $rootUrl Root URL of the addok server + * @param ClientInterface $client an HTTP adapter + * @param string $rootUrl Root URL of the addok server */ - public function __construct(HttpClient $client, $rootUrl) + public function __construct(ClientInterface $client, $rootUrl) { parent::__construct($client); diff --git a/Tests/IntegrationTest.php b/Tests/IntegrationTest.php index b5d8731..8b0c3da 100644 --- a/Tests/IntegrationTest.php +++ b/Tests/IntegrationTest.php @@ -12,7 +12,7 @@ use Geocoder\IntegrationTest\ProviderIntegrationTest; use Geocoder\Provider\Addok\Addok; -use Http\Client\HttpClient; +use Psr\Http\Client\ClientInterface; class IntegrationTest extends ProviderIntegrationTest { @@ -30,7 +30,7 @@ class IntegrationTest extends ProviderIntegrationTest 'testReverseQueryWithNoResults' => 'Addok returns "debug" information for reverse geocoding on coordinates 0, 0. See https://github.com/addok/addok/issues/505', ]; - protected function createProvider(HttpClient $httpClient) + protected function createProvider(ClientInterface $httpClient) { return Addok::withBANServer($httpClient); }