src/Valkyrja/HttpMessage/NativeStream.php
public function isWritable(): bool
    {
        // If there is no stream
        if (null === $this->stream) {
            // The stream is definitely not writable
            return false;
        }

        // Get the stream's mode
        $mode = $this->getMetadata('mode');

        return
            false !== strpos($mode, 'x')
            || false !== strpos($mode, 'w')
            || false !== strpos($mode, 'c')
            || false !== strpos($mode, 'a')
            || false !== strpos($mode, '+');
    }
public function isWritable(): bool
    {
        // If there is no stream
        if (null === $this->stream) {
            // The stream is definitely not writable
            return false;
        }

        // Get the stream's mode
        $mode = $this->getMetadata('mode');

        return
            false !== strpos($mode, 'x')
            || false !== strpos($mode, 'w')
            || false !== strpos($mode, 'c')
            || false !== strpos($mode, 'a')
            || false !== strpos($mode, '+');
    }
Returns whether or not the stream is writable.

@return bool