public function getContents()
    {
        if (is_null($this->stream) || ! $this->isReadable()) {
            $message = 'Could not get contents of stream';

            throw new \RuntimeException($message);
        }

        return stream_get_contents($this->stream);
    }
public function getContents()
    {
        if (is_null($this->stream) || ! $this->isReadable()) {
            $message = 'Could not get contents of stream';

            throw new \RuntimeException($message);
        }

        return stream_get_contents($this->stream);
    }
Returns the remaining contents in a string

@return string

@throws \RuntimeException