*
* @param callable $rule A PHP callable
* @param string $locale The locale
- *
- * @throws \LogicException
*/
- public static function set($rule, $locale)
+ public static function set(callable $rule, $locale)
{
if ('pt_BR' === $locale) {
// temporary set a locale for brazilian
$locale = substr($locale, 0, -strlen(strrchr($locale, '_')));
}
- if (!is_callable($rule)) {
- throw new \LogicException('The given rule can not be called');
- }
-
self::$rules[$locale] = $rule;
}
}