3
3
namespace Http \HttplugBundle \ClientFactory ;
4
4
5
5
use Http \Client \Curl \Client ;
6
- use Http \Message \MessageFactory ;
7
- use Http \Message \StreamFactory ;
6
+ use Psr \ Http \Message \ResponseFactoryInterface ;
7
+ use Psr \ Http \Message \StreamFactoryInterface ;
8
8
9
9
/**
10
10
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
11
11
*/
12
12
class CurlFactory implements ClientFactory
13
13
{
14
14
/**
15
- * @var MessageFactory
15
+ * @var ResponseFactoryInterface
16
16
*/
17
- private $ messageFactory ;
17
+ private $ responseFactory ;
18
18
19
19
/**
20
- * @var StreamFactory
20
+ * @var StreamFactoryInterface
21
21
*/
22
22
private $ streamFactory ;
23
23
24
24
/**
25
- * @param MessageFactory $messageFactory
26
- * @param StreamFactory $streamFactory
25
+ * @param ResponseFactoryInterface $responseFactory
26
+ * @param StreamFactoryInterface $streamFactory
27
27
*/
28
- public function __construct (MessageFactory $ messageFactory , StreamFactory $ streamFactory )
28
+ public function __construct (ResponseFactoryInterface $ responseFactory , StreamFactoryInterface $ streamFactory )
29
29
{
30
- $ this ->messageFactory = $ messageFactory ;
30
+ $ this ->responseFactory = $ responseFactory ;
31
31
$ this ->streamFactory = $ streamFactory ;
32
32
}
33
33
@@ -53,6 +53,6 @@ public function createClient(array $config = [])
53
53
}
54
54
}
55
55
56
- return new Client ($ this ->messageFactory , $ this ->streamFactory , $ config );
56
+ return new Client ($ this ->responseFactory , $ this ->streamFactory , $ config );
57
57
}
58
58
}
0 commit comments