private function createStreamFromString(string $string): Stream
    {
        $stream = new Stream(fopen('php://temp', 'r+b'));
        $stream->write($string);
        $stream->rewind();

        return $stream;
    }