Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class RequestFactory implements RequestFactoryInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var UriFactoryInterface The URI factory used for generating request URIs. |
||
24 | */ |
||
25 | protected $uriFactory; |
||
26 | |||
27 | /** |
||
28 | * @var StreamFactoryInterface The stream factory used for generating request bodies. |
||
29 | */ |
||
30 | protected $streamFactory; |
||
31 | |||
32 | /** |
||
33 | * Constructs the RequestFactory. |
||
34 | * |
||
35 | * @param UriFactoryInterface $uriFactory A URI factory. |
||
36 | * @param StreamFactoryInterface $streamFactory A stream factory. |
||
37 | */ |
||
38 | public function __construct(UriFactoryInterface $uriFactory, StreamFactoryInterface $streamFactory) |
||
39 | { |
||
40 | $this->uriFactory = $uriFactory; |
||
41 | $this->streamFactory = $streamFactory; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | public function createRequest(string $method, $uri): RequestInterface |
||
59 | ); |
||
60 | } |
||
62 |