original_string: public static function fillBuffer(StreamInterface $stream, $bufferSize = 8192)
  	{
  		if(!$stream->isReadable())
  		{
  			throw new \InvalidArgumentException(sprintf('Stream is not readable: %s', get_class($stream)));
  		}
  		
  		$buffer = '';
  		
  		while(!$stream->eof() && strlen($buffer) < $bufferSize)
  		{
  			$buffer .= $stream->read($bufferSize - strlen($buffer));
  		}
  		
  		return $buffer;
  	}
code: public static function fillBuffer(StreamInterface $stream, $bufferSize = 8192)
  	{
  		if(!$stream->isReadable())
  		{
  			throw new \InvalidArgumentException(sprintf('Stream is not readable: %s', get_class($stream)));
  		}
  		
  		$buffer = '';
  		
  		while(!$stream->eof() && strlen($buffer) < $bufferSize)
  		{
  			$buffer .= $stream->read($bufferSize - strlen($buffer));
  		}
  		
  		return $buffer;
  	}
code_tokens: public static function fillBuffer ( StreamInterface $ stream , $ bufferSize = 8192 ) { if ( ! $ stream -> isReadable ( ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Stream is not readable: %s' , get_class ( $ stream ) ) ) ; } $ buffer = '' ; while ( ! $ stream -> eof ( ) && strlen ( $ buffer ) < $ bufferSize ) { $ buffer .= $ stream -> read ( $ bufferSize - strlen ( $ buffer ) ) ; } return $ buffer ; }
docstring: Read contents from the given input stream until EOF or the specified buffer is full.
  
  @param StreamInterface $stream
  @param int $bufferSize
  @return string
  
  @throws \InvalidArgumentException When the stream is not readable.
docstring_tokens: Read contents from the given input stream until EOF or the specified buffer is full .