src/Multipart/AbstractUploader.php
private function determineSource($source)
    {
        // Use the contents of a file as the data source.
        if (is_string($source)) {
            $source = Psr7\try_fopen($source, 'r');
        }

        // Create a source stream.
        $stream = Psr7\stream_for($source);
        if (!$stream->isReadable()) {
            throw new IAE('Source stream must be readable.');
        }

        return $stream;
    }
private function determineSource($source)
    {
        // Use the contents of a file as the data source.
        if (is_string($source)) {
            $source = Psr7\try_fopen($source, 'r');
        }

        // Create a source stream.
        $stream = Psr7\stream_for($source);
        if (!$stream->isReadable()) {
            throw new IAE('Source stream must be readable.');
        }

        return $stream;
    }
private function determineSource ( $ source ) { // Use the contents of a file as the data source. if ( is_string ( $ source ) ) { $ source = Psr7 \ try_fopen ( $ source , 'r' ) ; } // Create a source stream. $ stream = Psr7 \ stream_for ( $ source ) ; if ( ! $ stream -> isReadable ( ) ) { throw new IAE ( 'Source stream must be readable.' ) ; } return $ stream ; }
Turns the provided source into a stream and stores it.

If a string is provided, it is assumed to be a filename, otherwise, it
passes the value directly to `Psr7\stream_for()`.

@param mixed $source

@return Stream
Turns the provided source into a stream and stores it .