src/Stream.php
public function getContents()
    {
        if (!$this->isReadable() || ($contents = stream_get_contents($this->fp, -1, 0)) === false) {
            throw new \RuntimeException('Unable to get contents of stream');
        }

        return $contents;
    }
public function getContents()
    {
        if (!$this->isReadable() || ($contents = stream_get_contents($this->fp, -1, 0)) === false) {
            throw new \RuntimeException('Unable to get contents of stream');
        }

        return $contents;
    }
Returns the remaining contents in a string

@return string
@throws \RuntimeException if unable to read or an error occurs while
reading.