| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function read(Buffer $buffer) |
||
| 17 | { |
||
| 18 | parent::read($buffer); |
||
| 19 | $buffer = $buffer->allocate($this->dataCount * $this->dataSize); |
||
| 20 | while ($varNameLength = $buffer->readInt()) { |
||
| 21 | $varName = trim($buffer->readString($varNameLength)); |
||
|
|
|||
| 22 | $count = ord($buffer->read(1)); |
||
| 23 | $this->data[$varName] = []; |
||
| 24 | $valueLength = $buffer->readInt(); |
||
| 25 | for ($i = 0; $i < $count; $i++) { |
||
| 26 | $value = $buffer->readString($valueLength); |
||
| 27 | $this->data[$varName][] = rtrim($value); |
||
| 28 | } |
||
| 55 |