Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / validator / Constraints / LocaleValidator.php
index 93eab8cb7e757c92f41e31df6ccbf41aaf121ff1..40d63970e25a6ecb5f9ab5025f334b02d1283c85 100644 (file)
@@ -36,7 +36,7 @@ class LocaleValidator extends ConstraintValidator
             return;
         }
 
-        if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) {
+        if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
             throw new UnexpectedTypeException($value, 'string');
         }
 
@@ -44,7 +44,7 @@ class LocaleValidator extends ConstraintValidator
         $locales = Intl::getLocaleBundle()->getLocaleNames();
         $aliases = Intl::getLocaleBundle()->getAliases();
 
-        if (!isset($locales[$value]) && !in_array($value, $aliases)) {
+        if (!isset($locales[$value]) && !\in_array($value, $aliases)) {
             $this->context->buildViolation($constraint->message)
                 ->setParameter('{{ value }}', $this->formatValue($value))
                 ->setCode(Locale::NO_SUCH_LOCALE_ERROR)