Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / serializer / Normalizer / ArrayDenormalizer.php
index 60ba68be251464d9068ba0d09efc03817a28c9ad..23b3a0e95b023ebdeefd3339ebf1c0a17114a779 100644 (file)
@@ -41,8 +41,8 @@ class ArrayDenormalizer implements DenormalizerInterface, SerializerAwareInterfa
         if (null === $this->serializer) {
             throw new BadMethodCallException('Please set a serializer before calling denormalize()!');
         }
-        if (!is_array($data)) {
-            throw new InvalidArgumentException('Data expected to be an array, '.gettype($data).' given.');
+        if (!\is_array($data)) {
+            throw new InvalidArgumentException('Data expected to be an array, '.\gettype($data).' given.');
         }
         if ('[]' !== substr($class, -2)) {
             throw new InvalidArgumentException('Unsupported class: '.$class);
@@ -53,8 +53,8 @@ class ArrayDenormalizer implements DenormalizerInterface, SerializerAwareInterfa
 
         $builtinType = isset($context['key_type']) ? $context['key_type']->getBuiltinType() : null;
         foreach ($data as $key => $value) {
-            if (null !== $builtinType && !call_user_func('is_'.$builtinType, $key)) {
-                throw new NotNormalizableValueException(sprintf('The type of the key "%s" must be "%s" ("%s" given).', $key, $builtinType, gettype($key)));
+            if (null !== $builtinType && !\call_user_func('is_'.$builtinType, $key)) {
+                throw new NotNormalizableValueException(sprintf('The type of the key "%s" must be "%s" ("%s" given).', $key, $builtinType, \gettype($key)));
             }
 
             $data[$key] = $serializer->denormalize($value, $class, $format, $context);