private function validateActive(): void
    {
        if ($this->isOk() === false) {
            throw new RuntimeException(\sprintf(
                'Cannot retrieve stream due to upload error: %s',
                self::$errorMessages[$this->error]
            ));
        }

        if ($this->isMoved()) {
            throw new RuntimeException('Cannot retrieve stream after it has already been moved.');
        }
    }