Zend\Diactoros\Response::setStatusCode PHP Method

setStatusCode() private method

Validate a status code.
private setStatusCode ( integer | string $code )
$code integer | string
    private function setStatusCode($code)
    {
        if (!is_numeric($code) || is_float($code) || $code < 100 || $code >= 600) {
            throw new InvalidArgumentException(sprintf('Invalid status code "%s"; must be an integer between 100 and 599, inclusive', is_scalar($code) ? $code : gettype($code)));
        }
        $this->statusCode = $code;
    }