Skip to content

Commit a5516fc

Browse files
fix merge
1 parent 3b9009e commit a5516fc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ public function getTypes(DocType $varType): array
8080
/**
8181
* Creates a {@see Type} from a PHPDoc type.
8282
*/
83-
private function createType(DocType $type, bool $nullable): ?Type
83+
private function createType(DocType $type, bool $nullable, string $docType = null): ?Type
8484
{
85-
$docType = (string) $type;
85+
$docType = $docType ?? (string) $type;
8686

8787
if ($type instanceof Collection) {
8888
list($phpType, $class) = $this->getPhpTypeAndClass((string) $type->getFqsen());
@@ -109,7 +109,7 @@ private function createType(DocType $type, bool $nullable): ?Type
109109
$collectionValueType = null;
110110
} else {
111111
$collectionKeyType = new Type(Type::BUILTIN_TYPE_INT);
112-
$collectionValueType = $this->createType(substr($docType, 0, -2), $nullable);
112+
$collectionValueType = $this->createType($type, $nullable, substr($docType, 0, -2));
113113
}
114114

115115
return new Type(Type::BUILTIN_TYPE_ARRAY, $nullable, null, true, $collectionKeyType, $collectionValueType);

0 commit comments

Comments
 (0)