Skip to content

Commit b848a60

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 4443a1e commit b848a60

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

PickPoint.php

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

2727
/**
2828
* @author Vladimir Kalinkin <[email protected]>
@@ -40,10 +40,10 @@ final class PickPoint extends AbstractHttpProvider implements Provider
4040
private $apiKey;
4141

4242
/**
43-
* @param HttpClient $client an HTTP adapter
44-
* @param string $apiKey an API key
43+
* @param ClientInterface $client an HTTP adapter
44+
* @param string $apiKey an API key
4545
*/
46-
public function __construct(HttpClient $client, string $apiKey)
46+
public function __construct(ClientInterface $client, string $apiKey)
4747
{
4848
if (empty($apiKey)) {
4949
throw new InvalidCredentials('No API key provided.');

Tests/IntegrationTest.php

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

1313
use Geocoder\IntegrationTest\ProviderIntegrationTest;
1414
use Geocoder\Provider\PickPoint\PickPoint;
15-
use Http\Client\HttpClient;
15+
use Psr\Http\Client\ClientInterface;
1616

1717
/**
1818
* @author Vladimir Kalinkin <[email protected]>
1919
*/
2020
class IntegrationTest extends ProviderIntegrationTest
2121
{
22-
protected function createProvider(HttpClient $httpClient)
22+
protected function createProvider(ClientInterface $httpClient)
2323
{
2424
return new PickPoint($httpClient, $this->getApiKey());
2525
}

0 commit comments

Comments
 (0)