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 45bd182 commit eeda249
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions LocationIQ.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Geocoder\Query\ReverseQuery;
use Geocoder\Http\Provider\AbstractHttpProvider;
use Geocoder\Provider\Provider;
use Http\Client\HttpClient;
use Psr\Http\Client\ClientInterface;

/**
* @author Srihari Thalla <[email protected]>
Expand Down Expand Up @@ -54,10 +54,10 @@ final class LocationIQ 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, string $region = null)
public function __construct(ClientInterface $client, string $apiKey, string $region = null)
{
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,7 +12,7 @@

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

/**
* @author Srihari Thalla <[email protected]>
Expand All @@ -27,7 +27,7 @@ class IntegrationTest extends ProviderIntegrationTest

protected $testIpv6 = false;

protected function createProvider(HttpClient $httpClient)
protected function createProvider(ClientInterface $httpClient)
{
return new LocationIQ($httpClient, $this->getApiKey());
}
Expand Down

0 comments on commit eeda249

Please sign in to comment.