| Total Complexity | 2 |
| Total Lines | 18 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 8 | final class ProtocolHeader |
||
| 9 | { |
||
| 10 | public const WIRE_SIZE = 12; |
||
| 11 | |||
| 12 | private $type; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param int $type |
||
| 16 | * @throws InvalidValueException |
||
| 17 | */ |
||
| 18 | 29 | public function __construct(int $type) |
|
| 19 | { |
||
| 20 | 29 | $this->type = validate_uint16('Message type', $type); |
|
| 21 | } |
||
| 22 | |||
| 23 | 13 | public function getType(): int |
|
| 26 | } |
||
| 27 | } |
||
| 28 |