Skip to content

Commit c4f29d5

Browse files
authored
Expect a PSR-18 client instead of a PHP-HTTP client (#1110)
* Expect a PSR-18 client instead of a PHP-HTTP client * Update integration tests
1 parent 2e7de87 commit c4f29d5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Tests/IntegrationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
use Geocoder\IntegrationTest\ProviderIntegrationTest;
1616
use Geocoder\Provider\TomTom\TomTom;
17-
use Http\Client\HttpClient;
17+
use Psr\Http\Client\ClientInterface;
1818

1919
/**
2020
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
@@ -29,7 +29,7 @@ class IntegrationTest extends ProviderIntegrationTest
2929

3030
protected $testIpv6 = false;
3131

32-
protected function createProvider(HttpClient $httpClient)
32+
protected function createProvider(ClientInterface $httpClient)
3333
{
3434
return new TomTom($httpClient, $this->getApiKey());
3535
}

TomTom.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Geocoder\Query\ReverseQuery;
2222
use Geocoder\Http\Provider\AbstractHttpProvider;
2323
use Geocoder\Provider\Provider;
24-
use Http\Client\HttpClient;
24+
use Psr\Http\Client\ClientInterface;
2525

2626
/**
2727
* @author Antoine Corcy <contact@sbin.dk>
@@ -44,10 +44,10 @@ final class TomTom extends AbstractHttpProvider implements Provider
4444
private $apiKey;
4545

4646
/**
47-
* @param HttpClient $client an HTTP adapter
48-
* @param string $apiKey an API key
47+
* @param ClientInterface $client an HTTP adapter
48+
* @param string $apiKey an API key
4949
*/
50-
public function __construct(HttpClient $client, string $apiKey)
50+
public function __construct(ClientInterface $client, string $apiKey)
5151
{
5252
if (empty($apiKey)) {
5353
throw new InvalidCredentials('No API key provided.');

0 commit comments

Comments
 (0)