src/Stream/Iterator/ReadIterator.php
public function getIterator(): \Generator
    {
        while (!$this->stream->eof()) {
            $item = $this->stream->read($this->chunkSize);
            // @codeCoverageIgnoreStart
            //I don't know how to fabricate this manually, so I can't test it.
            if ($item === '') {
                continue;
            }
            // @codeCoverageIgnoreEnd
            yield $item;
        }
    }
public function getIterator(): \Generator
    {
        while (!$this->stream->eof()) {
            $item = $this->stream->read($this->chunkSize);
            // @codeCoverageIgnoreStart
            //I don't know how to fabricate this manually, so I can't test it.
            if ($item === '') {
                continue;
            }
            // @codeCoverageIgnoreEnd
            yield $item;
        }
    }
public function getIterator ( ) : \ Generator { while ( ! $ this -> stream -> eof ( ) ) { $ item = $ this -> stream -> read ( $ this -> chunkSize ) ; // @codeCoverageIgnoreStart //I don't know how to fabricate this manually, so I can't test it. if ( $ item === '' ) { continue ; } // @codeCoverageIgnoreEnd yield $ item ; } }
Generates chunks based on the passed chunk size through reading from the stream.

@return \Generator
Generates chunks based on the passed chunk size through reading from the stream .