File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed
Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1818use Geocoder \Provider \AbstractProvider ;
1919use Http \Message \MessageFactory ;
2020use Http \Discovery \MessageFactoryDiscovery ;
21- use Http \Client \HttpClient ;
21+ use Psr \ Http \Client \ClientInterface ;
2222use Psr \Http \Message \RequestInterface ;
2323
2424/**
2828abstract class AbstractHttpProvider extends AbstractProvider
2929{
3030 /**
31- * @var HttpClient
31+ * @var ClientInterface
3232 */
3333 private $ client ;
3434
@@ -38,10 +38,10 @@ abstract class AbstractHttpProvider extends AbstractProvider
3838 private $ messageFactory ;
3939
4040 /**
41- * @param HttpClient $client
41+ * @param ClientInterface $client
4242 * @param MessageFactory|null $factory
4343 */
44- public function __construct (HttpClient $ client , MessageFactory $ factory = null )
44+ public function __construct (ClientInterface $ client , MessageFactory $ factory = null )
4545 {
4646 $ this ->client = $ client ;
4747 $ this ->messageFactory = $ factory ?: MessageFactoryDiscovery::find ();
@@ -106,9 +106,9 @@ protected function getParsedResponse(RequestInterface $request): string
106106 /**
107107 * Returns the HTTP adapter.
108108 *
109- * @return HttpClient
109+ * @return ClientInterface
110110 */
111- protected function getHttpClient (): HttpClient
111+ protected function getHttpClient (): ClientInterface
112112 {
113113 return $ this ->client ;
114114 }
Original file line number Diff line number Diff line change 1717use Geocoder \Model \AddressCollection ;
1818use Geocoder \Query \GeocodeQuery ;
1919use Geocoder \Query \ReverseQuery ;
20- use Http \Client \HttpClient ;
20+ use Psr \ Http \Client \ClientInterface ;
2121use Http \Mock \Client ;
2222use PHPUnit \Framework \TestCase ;
2323
@@ -33,7 +33,7 @@ public function testHttpClientGetter()
3333
3434class DummyProvider extends AbstractHttpProvider
3535{
36- public function getHttpClient (): HttpClient
36+ public function getHttpClient (): ClientInterface
3737 {
3838 return parent ::getHttpClient ();
3939 }
You can’t perform that action at this time.
0 commit comments