Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class DeferredResponseFactory implements ResponseFactoryInterface |
||
11 | { |
||
12 | private StreamFactoryInterface $streamFactory; |
||
13 | |||
14 | public function __construct(StreamFactoryInterface $streamFactory) |
||
17 | } |
||
18 | |||
19 | public function createResponse(int $code = 200, string $reasonPhrase = '', $data = null): ResponseInterface |
||
20 | { |
||
21 | return new DeferredResponse($data, $this->createResponseInternal($code, $reasonPhrase), $this->streamFactory); |
||
22 | } |
||
23 | |||
24 | private function createResponseInternal(int $code = 200, string $reasonPhrase = ''): ResponseInterface |
||
32 | } |
||
33 | } |
||
34 |