Skip to content

Commit 52a82da

Browse files
committed
Use ClientInterface in MockFactory
HttpClient is deprecated in favor of ClientInterface. By accepting ClientInterface in the MockFactory, developers can transition to the ClientInterface.
1 parent 894143b commit 52a82da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ClientFactory/MockFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
namespace Http\HttplugBundle\ClientFactory;
66

7-
use Http\Client\HttpClient;
87
use Http\Mock\Client;
8+
use Psr\Http\Client\ClientInterface;
99

1010
/**
1111
* @author Gary PEGEOT <[email protected]>
1212
*/
1313
final class MockFactory implements ClientFactory
1414
{
1515
/**
16-
* @var HttpClient
16+
* @var ClientInterface
1717
*/
1818
private $client;
1919

@@ -22,7 +22,7 @@ final class MockFactory implements ClientFactory
2222
*
2323
* Note that this can be any client, not only a mock client.
2424
*/
25-
public function setClient(HttpClient $client)
25+
public function setClient(ClientInterface $client)
2626
{
2727
$this->client = $client;
2828
}

0 commit comments

Comments
 (0)