File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 18
18
use Geocoder \Provider \AbstractProvider ;
19
19
use Http \Message \MessageFactory ;
20
20
use Http \Discovery \MessageFactoryDiscovery ;
21
- use Http \Client \HttpClient ;
21
+ use Psr \ Http \Client \ClientInterface ;
22
22
use Psr \Http \Message \RequestInterface ;
23
23
24
24
/**
28
28
abstract class AbstractHttpProvider extends AbstractProvider
29
29
{
30
30
/**
31
- * @var HttpClient
31
+ * @var ClientInterface
32
32
*/
33
33
private $ client ;
34
34
@@ -38,10 +38,10 @@ abstract class AbstractHttpProvider extends AbstractProvider
38
38
private $ messageFactory ;
39
39
40
40
/**
41
- * @param HttpClient $client
41
+ * @param ClientInterface $client
42
42
* @param MessageFactory|null $factory
43
43
*/
44
- public function __construct (HttpClient $ client , MessageFactory $ factory = null )
44
+ public function __construct (ClientInterface $ client , MessageFactory $ factory = null )
45
45
{
46
46
$ this ->client = $ client ;
47
47
$ this ->messageFactory = $ factory ?: MessageFactoryDiscovery::find ();
@@ -106,9 +106,9 @@ protected function getParsedResponse(RequestInterface $request): string
106
106
/**
107
107
* Returns the HTTP adapter.
108
108
*
109
- * @return HttpClient
109
+ * @return ClientInterface
110
110
*/
111
- protected function getHttpClient (): HttpClient
111
+ protected function getHttpClient (): ClientInterface
112
112
{
113
113
return $ this ->client ;
114
114
}
Original file line number Diff line number Diff line change 17
17
use Geocoder \Model \AddressCollection ;
18
18
use Geocoder \Query \GeocodeQuery ;
19
19
use Geocoder \Query \ReverseQuery ;
20
- use Http \Client \HttpClient ;
20
+ use Psr \ Http \Client \ClientInterface ;
21
21
use Http \Mock \Client ;
22
22
use PHPUnit \Framework \TestCase ;
23
23
@@ -33,7 +33,7 @@ public function testHttpClientGetter()
33
33
34
34
class DummyProvider extends AbstractHttpProvider
35
35
{
36
- public function getHttpClient (): HttpClient
36
+ public function getHttpClient (): ClientInterface
37
37
{
38
38
return parent ::getHttpClient ();
39
39
}
You can’t perform that action at this time.
0 commit comments