Total Complexity | 3 |
Total Lines | 27 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
11 | class PongSerializer |
||
12 | { |
||
13 | /** |
||
14 | 9 | * @param Pong $pong |
|
15 | * @return BufferInterface |
||
16 | 9 | */ |
|
17 | 9 | public function serialize(Pong $pong): BufferInterface |
|
20 | } |
||
21 | |||
22 | /** |
||
23 | * @param Parser $parser |
||
24 | * @return Pong |
||
25 | 9 | */ |
|
26 | public function fromParser(Parser $parser): Pong |
||
27 | 9 | { |
|
28 | 9 | return new Pong($parser->readBytes(8)); |
|
29 | 6 | } |
|
30 | |||
31 | /** |
||
32 | * @param BufferInterface $data |
||
33 | * @return Pong |
||
34 | */ |
||
35 | public function parse(BufferInterface $data): Pong |
||
38 | 3 | } |
|
39 | } |
||
40 |