Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | protected function createIterator(): iterable |
||
50 | { |
||
51 | $read = [$this->handle]; |
||
52 | $write = []; |
||
53 | $except = []; |
||
54 | $result = stream_select($read, $write, $except, 0); |
||
55 | |||
56 | if ($result === false) { |
||
57 | throw new Exception('stream_select failed'); |
||
58 | } |
||
59 | if ($result !== 0) { |
||
60 | yield stream_get_line($this->handle, null); |
||
61 | } |
||
62 | } |
||
63 | } |
||
64 |