Total Complexity | 2 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class QrCodeResponse extends Response |
||
14 | { |
||
15 | use Response\InjectContentTypeTrait; |
||
16 | |||
17 | 1 | public function __construct(QrCodeInterface $qrCode, int $status = StatusCode::STATUS_OK, array $headers = []) |
|
18 | { |
||
19 | 1 | parent::__construct( |
|
20 | 1 | $this->createBody($qrCode), |
|
21 | $status, |
||
22 | 1 | $this->injectContentType($qrCode->getContentType(), $headers), |
|
23 | ); |
||
24 | } |
||
25 | |||
26 | 1 | private function createBody(QrCodeInterface $qrCode): StreamInterface |
|
32 | } |
||
33 | } |
||
34 |