public static function scalar($value, $message = null, $propertyPath = null)
{
if (!is_scalar($value)) {
$message = sprintf($message ?: 'Value "%s" is not a scalar.', static::stringify($value));
throw static::createException($value, $message, static::INVALID_SCALAR, $propertyPath);
}
return true;
}