original_string: public static function reader(StreamInterface $stream, $bufferSize = 8192)
  	{
  		if(!$stream->isReadable())
  		{
  			throw new \InvalidArgumentException(sprintf('Stream is not readable: %s', get_class($stream)));
  		}
  		
  		while(!$stream->eof())
  		{
  			yield $stream->read($bufferSize);
  		}
  	}
code: public static function reader(StreamInterface $stream, $bufferSize = 8192)
  	{
  		if(!$stream->isReadable())
  		{
  			throw new \InvalidArgumentException(sprintf('Stream is not readable: %s', get_class($stream)));
  		}
  		
  		while(!$stream->eof())
  		{
  			yield $stream->read($bufferSize);
  		}
  	}
code_tokens: public static function reader ( StreamInterface $ stream , $ bufferSize = 8192 ) { if ( ! $ stream -> isReadable ( ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Stream is not readable: %s' , get_class ( $ stream ) ) ) ; } while ( ! $ stream -> eof ( ) ) { yield $ stream -> read ( $ bufferSize ) ; } }
docstring: Turn a stream into an iterator.
  
  @param StreamInterface $stream
  @param int $bufferSize
  @return \Iterator
  
  @throws \InvalidArgumentException When the stream is not readable.
docstring_tokens: Turn a stream into an iterator .