| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | trait TBody |
||
| 18 | { |
||
| 19 | protected ?StreamInterface $body = null; |
||
| 20 | |||
| 21 | 6 | public function getBody(): StreamInterface |
|
| 22 | { |
||
| 23 | 6 | if (empty($this->body)) { |
|
| 24 | 1 | throw new RuntimeException('You must set the body first!'); |
|
| 25 | } |
||
| 26 | 5 | return $this->body; |
|
| 27 | } |
||
| 28 | |||
| 29 | 5 | public function withBody(StreamInterface $body): MessageInterface |
|
| 33 | } |
||
| 34 | } |
||
| 35 |