| Total Complexity | 6 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | final class CDataByteReader implements ByteReaderInterface |
||
| 24 | { |
||
| 25 | use ByteReaderDisableWriteAccessTrait; |
||
| 26 | |||
| 27 | /** @param CArray<int> $source */ |
||
| 28 | public function __construct( |
||
| 29 | private CData $source |
||
| 30 | ) { |
||
| 31 | } |
||
| 32 | |||
| 33 | public function offsetExists($offset): bool |
||
| 34 | { |
||
| 35 | if (count($this->source) <= $offset) { |
||
|
|
|||
| 36 | return false; |
||
| 37 | } |
||
| 38 | return !is_null($this->source[$offset]); |
||
| 39 | } |
||
| 40 | |||
| 41 | public function offsetGet($offset): int |
||
| 42 | { |
||
| 43 | return $this->source[$offset]; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function createSliceAsString(int $offset, int $size): string |
||
| 53 | } |
||
| 54 | } |
||
| 55 |