src/Message/MessageFactory.php
public function body($body)
    {
        if ($body instanceof ReadableStreamInterface) {
            return new ReadableBodyStream($body);
        }

        return \RingCentral\Psr7\stream_for($body);
    }
public function body($body)
    {
        if ($body instanceof ReadableStreamInterface) {
            return new ReadableBodyStream($body);
        }

        return \RingCentral\Psr7\stream_for($body);
    }
public function body ( $ body ) { if ( $ body instanceof ReadableStreamInterface ) { return new ReadableBodyStream ( $ body ) ; } return \ RingCentral \ Psr7 \ stream_for ( $ body ) ; }
Creates a new instance of StreamInterface for the given body contents

@param ReadableStreamInterface|string $body
@return StreamInterface
Creates a new instance of StreamInterface for the given body contents