SevenShores\Hubspot\Http\Response::withStatus PHP Метод

withStatus() публичный Метод

If no reason phrase is specified, implementations MAY choose to default to the RFC 7231 or IANA recommended reason phrase for the response's status code. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated status and reason phrase.
public withStatus ( integer $code, string $reasonPhrase = '' ) : self
$code integer The 3-digit integer result code to set.
$reasonPhrase string The reason phrase to use with the provided status code; if none is provided, implementations MAY use the defaults as suggested in the HTTP specification.
Результат self
    function withStatus($code, $reasonPhrase = '')
    {
        return $this->response->withStatus($code, $reasonPhrase);
    }