Total Complexity | 4 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Coverage | 75% |
Changes | 0 |
1 | <?php |
||
18 | final class PacketLength |
||
19 | { |
||
20 | public const SIZE_BYTES = 5; |
||
21 | |||
22 | private function __construct() |
||
23 | { |
||
24 | } |
||
25 | |||
26 | 194 | public static function pack(int $length) : string |
|
27 | { |
||
28 | 194 | return \pack('CN', 0xce, $length); |
|
29 | } |
||
30 | |||
31 | 190 | public static function unpack(string $data) : int |
|
38 | } |
||
39 | } |
||
40 |