public static function isTraversable($value, $message = null, $propertyPath = null)
{
if (!is_array($value) && !$value instanceof \Traversable) {
$message = sprintf($message ?: 'Value "%s" is not an array and does not implement Traversable.', static::stringify($value));
throw static::createException($value, $message, static::INVALID_TRAVERSABLE, $propertyPath);
}
return true;
}