Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 12 |
Ratio | 100 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
30 | 21 | View Code Duplication | public static function decode(Buffer $data) |
31 | { |
||
32 | 21 | $length = LongValue::decode($data); |
|
33 | 21 | $buffer = new Buffer($data->read($length)); |
|
34 | 21 | $elements = []; |
|
35 | |||
36 | 21 | while (!$buffer->eof()) { |
|
37 | 21 | $elements[ShortStringValue::decode($buffer)] = TypifiedValue::decode($buffer); |
|
38 | 21 | } |
|
39 | |||
40 | 21 | return $elements; |
|
41 | } |
||
42 | } |
||
43 |