From a02de61490778cec009ebb03e9570b1d1912d21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Beli=C3=ABn?= Date: Sun, 31 Jul 2022 10:29:14 +0200 Subject: [PATCH] Migrate to PSR-18 (#5) --- Geo6.php | 6 +++--- Tests/IntegrationTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Geo6.php b/Geo6.php index e282c18..479b0a2 100644 --- a/Geo6.php +++ b/Geo6.php @@ -23,13 +23,13 @@ use Geocoder\Provider\Provider; use Geocoder\Query\GeocodeQuery; use Geocoder\Query\ReverseQuery; -use Http\Client\HttpClient; use Jose\Component\Core\AlgorithmManager; use Jose\Component\Core\Converter\StandardConverter; use Jose\Component\Core\JWK; use Jose\Component\Signature\Algorithm\HS512; use Jose\Component\Signature\JWSBuilder; use Jose\Component\Signature\Serializer\CompactSerializer; +use Psr\Http\Client\ClientInterface; /** * @author Jonathan Beliƫn @@ -54,9 +54,9 @@ final class Geo6 extends AbstractHttpProvider implements Provider private $useGeo6Token = false; /** - * @param HttpClient $client an HTTP adapter + * @param ClientInterface $client an HTTP adapter */ - public function __construct(HttpClient $client, string $clientId, string $privateKey, bool $useGeo6Token = false) + public function __construct(ClientInterface $client, string $clientId, string $privateKey, bool $useGeo6Token = false) { $this->clientId = $clientId; $this->privateKey = $privateKey; diff --git a/Tests/IntegrationTest.php b/Tests/IntegrationTest.php index 9915630..657c296 100644 --- a/Tests/IntegrationTest.php +++ b/Tests/IntegrationTest.php @@ -12,7 +12,7 @@ use Geocoder\IntegrationTest\ProviderIntegrationTest; use Geocoder\Provider\Geo6\Geo6; -use Http\Client\HttpClient; +use Psr\Http\Client\ClientInterface; class IntegrationTest extends ProviderIntegrationTest { @@ -30,7 +30,7 @@ class IntegrationTest extends ProviderIntegrationTest 'testExceptions' => 'Does not allow geocode query without data.', ]; - protected function createProvider(HttpClient $httpClient) + protected function createProvider(ClientInterface $httpClient) { return new Geo6($httpClient, $this->getCustomerId(), $this->getApiKey()); }