Skip to content

[MapTiler] Expect a PSR-18 client instead of a PHP-HTTP client #1160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Provider/MapTiler/MapTiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use Geocoder\Http\Provider\AbstractHttpProvider;
use Geocoder\Model\Bounds;
use Geocoder\Provider\Provider;
use Http\Client\HttpClient;
use Psr\Http\Client\ClientInterface;

/**
* @author Jonathan Beliën
Expand All @@ -41,10 +41,10 @@ final class MapTiler extends AbstractHttpProvider implements Provider
private $apiKey;

/**
* @param HttpClient $client an HTTP client
* @param string $key API key
* @param ClientInterface $client an HTTP client
* @param string $key API key
*/
public function __construct(HttpClient $client, string $apiKey)
public function __construct(ClientInterface $client, string $apiKey)
{
parent::__construct($client);

Expand Down
4 changes: 2 additions & 2 deletions src/Provider/MapTiler/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\MapTiler\MapTiler;
use Http\Client\HttpClient;
use Psr\Http\Client\ClientInterface;

/**
* @author Jonathan Beliën
Expand All @@ -29,7 +29,7 @@ class IntegrationTest extends ProviderIntegrationTest

protected $skippedTests = [];

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