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)));
}
}