public function setStatusCode($code, $text = null)
    {
        $this->statusCode = (int)$code;

        if ($text) {
            $this->statusText = $text;
        } elseif (isset($this->statusTexts[$code])) {
            $this->statusText = $this->statusTexts[$code];
        }

        return $this;
    }