| Conditions | 3 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function write(Traversable $data): void |
||
| 36 | { |
||
| 37 | /** @var string $item */ |
||
| 38 | foreach ($data as $item) { |
||
| 39 | if (@fwrite($this->stream, $item) === false) { |
||
| 40 | // should never happen |
||
| 41 | throw new RuntimeException('Was unable to write to a stream.'); |
||
| 42 | } |
||
| 43 | } |
||
| 44 | fflush($this->stream); |
||
| 45 | } |
||
| 47 |