Skip to content

Commit 87644f2

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 4849909 commit 87644f2

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

MapQuest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
use Geocoder\Query\GeocodeQuery;
2929
use Geocoder\Query\ReverseQuery;
3030
use Geocoder\Provider\Provider;
31-
use Http\Client\HttpClient;
31+
use Psr\Http\Client\ClientInterface;
3232
use Psr\Http\Message\ResponseInterface;
3333

3434
/**
@@ -100,12 +100,12 @@ final class MapQuest extends AbstractHttpProvider implements Provider
100100
private $apiKey;
101101

102102
/**
103-
* @param HttpClient $client an HTTP adapter
104-
* @param string $apiKey an API key
105-
* @param bool $licensed true to use MapQuest's licensed endpoints, default is false to use the open endpoints (optional)
106-
* @param bool $useRoadPosition true to use nearest point on a road for the entrance, false to use map display position
103+
* @param ClientInterface $client an HTTP adapter
104+
* @param string $apiKey an API key
105+
* @param bool $licensed true to use MapQuest's licensed endpoints, default is false to use the open endpoints (optional)
106+
* @param bool $useRoadPosition true to use nearest point on a road for the entrance, false to use map display position
107107
*/
108-
public function __construct(HttpClient $client, string $apiKey, bool $licensed = false, bool $useRoadPosition = false)
108+
public function __construct(ClientInterface $client, string $apiKey, bool $licensed = false, bool $useRoadPosition = false)
109109
{
110110
if (empty($apiKey)) {
111111
throw new InvalidCredentials('No API key provided.');

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\MapQuest\MapQuest;
17-
use Http\Client\HttpClient;
17+
use Psr\Http\Client\ClientInterface;
1818

1919
/**
2020
* @author Tobias Nyholm <[email protected]>
@@ -25,7 +25,7 @@ class IntegrationTest extends ProviderIntegrationTest
2525

2626
protected $testIpv6 = false;
2727

28-
protected function createProvider(HttpClient $httpClient)
28+
protected function createProvider(ClientInterface $httpClient)
2929
{
3030
return new MapQuest($httpClient, $this->getApiKey());
3131
}

0 commit comments

Comments
 (0)