public function stringToStream(string $input): StreamInterface
    {
        /** @var StreamInterface|null $stream */
        $stream = stream_for($input);
        if (!($stream instanceof StreamInterface)) {
            throw new \TypeError('Could not convert string to a stream');
        }
        return $stream;
    }
public function stringToStream(string $input): StreamInterface
    {
        /** @var StreamInterface|null $stream */
        $stream = stream_for($input);
        if (!($stream instanceof StreamInterface)) {
            throw new \TypeError('Could not convert string to a stream');
        }
        return $stream;
    }
public function stringToStream ( string $ input ) : StreamInterface { /** @var StreamInterface|null $stream */ $ stream = stream_for ( $ input ) ; if ( ! ( $ stream instanceof StreamInterface ) ) { throw new \ TypeError ( 'Could not convert string to a stream' ) ; } return $ stream ; }
Adapter-specific way of converting a string into a StreamInterface

@param string $input
@return StreamInterface
@throws \TypeError
Adapter - specific way of converting a string into a StreamInterface