| Total Complexity | 2 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | abstract class AbstractTpmStructure |
||
| 8 | { |
||
| 9 | 7 | protected function readLengthPrefixed(ByteBuffer $buffer, int &$offset): ByteBuffer |
|
| 10 | { |
||
| 11 | 7 | $len = $buffer->getUint16Val($offset); |
|
| 12 | 7 | $data = $buffer->getBytes($offset + 2, $len); |
|
| 13 | 7 | $offset += (2 + $len); |
|
| 14 | 7 | return new ByteBuffer($data); |
|
| 15 | } |
||
| 16 | |||
| 17 | 4 | protected function readFixed(ByteBuffer $buffer, int &$offset, int $length): ByteBuffer |
|
| 22 | } |
||
| 23 | } |
||
| 24 |