From a5516fc08d9b63c47f05c0507a52c1ae230891e5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 3 Aug 2018 14:20:17 +0200 Subject: [PATCH] fix merge --- .../Component/PropertyInfo/Util/PhpDocTypeHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php b/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php index 931d3e8376..a73480cfdb 100644 --- a/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php +++ b/src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php @@ -80,9 +80,9 @@ final class PhpDocTypeHelper /** * Creates a {@see Type} from a PHPDoc type. */ - private function createType(DocType $type, bool $nullable): ?Type + private function createType(DocType $type, bool $nullable, string $docType = null): ?Type { - $docType = (string) $type; + $docType = $docType ?? (string) $type; if ($type instanceof Collection) { list($phpType, $class) = $this->getPhpTypeAndClass((string) $type->getFqsen()); @@ -109,7 +109,7 @@ final class PhpDocTypeHelper $collectionValueType = null; } else { $collectionKeyType = new Type(Type::BUILTIN_TYPE_INT); - $collectionValueType = $this->createType(substr($docType, 0, -2), $nullable); + $collectionValueType = $this->createType($type, $nullable, substr($docType, 0, -2)); } return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType);