Total Complexity | 2 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | final class CustomResponseFactory implements ResponseFactoryInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var array |
||
16 | */ |
||
17 | private array $headers; |
||
18 | |||
19 | /** |
||
20 | * @var StreamInterface|string|resource |
||
21 | */ |
||
22 | private $body; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | private string $protocol; |
||
28 | |||
29 | /** |
||
30 | * @param array|null $headers |
||
31 | * @param StreamInterface|string|resource $body |
||
32 | * @param string $protocol |
||
33 | */ |
||
34 | 59 | public function __construct(array $headers = null, $body = 'php://temp', string $protocol = '1.1') |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * {@inheritDoc} |
||
43 | */ |
||
44 | 14 | public function createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface |
|
49 |