public function withStatus($code, $reason = '')
    {
        $code = Validator::checkCode($code);

        if (!is_string($reason) && !method_exists($reason, '__toString')) {
            throw new InvalidArgumentException('ReasonPhrase must be a string');
        }

        $clone = clone $this;
        $clone->code = $code;
        if ($reason === '') {
            $reason = Validator::getCodeMessage($code);
        }

        if ($reason === '') {
            throw new InvalidArgumentException('ReasonPhrase must be supplied for this code');
        }

        $clone->phrase = $reason;

        return $clone;
    }