Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / translation / PluralizationRules.php
index 09748211b13b3daaf3c703b2de66e05ec46af2a7..ef2be7097718ba4b10fa4912f2f14c8a8f252679 100644 (file)
@@ -192,10 +192,8 @@ class PluralizationRules
      *
      * @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
@@ -206,10 +204,6 @@ class PluralizationRules
             $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;
     }
 }