| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function get(): \Generator |
||
| 45 | { |
||
| 46 | while (!feof($this->stream)) { |
||
| 47 | $chunk = fread($this->stream, $this->size); |
||
| 48 | |||
| 49 | $chunk = preg_split("//u", $chunk, -1, PREG_SPLIT_NO_EMPTY); |
||
| 50 | $length = count($chunk); |
||
| 51 | |||
| 52 | for ($i = 0; $i < $length; $i++) { |
||
| 53 | yield $chunk[$i]; |
||
| 54 | } |
||
| 55 | } |
||
| 56 | } |
||
| 57 | } |
||
| 58 |