Explorar o código

small performance optimization

Johannes M. Schmitt %!s(int64=13) %!d(string=hai) anos
pai
achega
3c51bfe94a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Serializer/GraphNavigator.php

+ 1 - 1
Serializer/GraphNavigator.php

@@ -62,7 +62,7 @@ final class GraphNavigator
             return $visitor->visitBoolean($data, $type);
         } else if ('double' === $type) {
             return $visitor->visitDouble($data, $type);
-        } else if ('array' === $type || 0 === strpos($type, 'array<')) {
+        } else if ('array' === $type || ('a' === $type[0] && 0 === strpos($type, 'array<'))) {
             return $visitor->visitArray($data, $type);
         } else {
             if (self::DIRECTION_SERIALIZATION === $this->direction && null !== $data) {