public function status($status = null)
    {
        if ($status !== null) {
            if (!isset($this->statusTexts[$status])) {
                throw new ResponseException('Unsupported status code "' . $status . '"');
            }

            $this->status = (int) $status;

            if ($this->content === null) {
                $this->content = $this->statusTexts[$this->status];
            }
        }

        return $this->status;
    }