Phly\Http\Response::validateStatus PHP Method

validateStatus() private method

Validate a status code.
private validateStatus ( integer | string $code )
$code integer | string
    private function validateStatus($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)));
        }
    }