public static function max($value, $maxValue, $message = null, $propertyPath = null)
{
static::numeric($value, $message, $propertyPath);
if ($value > $maxValue) {
$message = sprintf($message ?: 'Number "%s" was expected to be at most "%s".', static::stringify($value), static::stringify($maxValue));
throw static::createException($value, $message, static::INVALID_MAX, $propertyPath, array('max' => $maxValue));
}
return true;
}