| Total Complexity | 4 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | trait ViewTrait |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var ResponseInterface |
||
| 16 | */ |
||
| 17 | protected $response; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @ses \Lit\Voltage\Interfaces\ViewInterface::setResponse |
||
| 21 | * @param ResponseInterface $response Set the response prototype. |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function setResponse(ResponseInterface $response): void |
||
| 25 | { |
||
| 26 | $this->response = $response; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Ensure body is empty and writable and return that. |
||
| 31 | * |
||
| 32 | * @return \Psr\Http\Message\StreamInterface |
||
| 33 | * @throws \RuntimeException When the body is not writable or not empty somehow. |
||
| 34 | */ |
||
| 35 | protected function getEmptyBody() |
||
| 46 | } |
||
| 47 | } |
||
| 48 |