| Total Complexity | 6 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 17 | trait MessageTrait |
||
| 18 | { |
||
| 19 | protected string $protocolVersion = '1.1'; |
||
| 20 | protected StreamInterface $stream; |
||
| 21 | |||
| 22 | public function getProtocolVersion(): string |
||
| 23 | { |
||
| 24 | return $this->protocolVersion; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function withProtocolVersion($version): static |
||
| 35 | 5 | } |
|
| 36 | 1 | ||
| 37 | public function getBody(): StreamInterface |
||
| 38 | { |
||
| 39 | 4 | return $this->stream ?? create_stream(null); |
|
| 40 | 4 | } |
|
| 41 | |||
| 42 | 4 | public function withBody(StreamInterface $body): static |
|
| 47 | 43 | } |
|
| 48 | |||
| 49 | public function __set($name, $value) |
||
| 51 | /* NOOP */ |
||
| 52 | 15 | } |
|
| 53 | } |
||
| 54 |