Skip to content

Commit

Permalink
ensure compatibility with type resolver 0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Sep 18, 2019
1 parent d9ce895 commit 2d708b3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Symfony/Component/PropertyInfo/Util/PhpDocTypeHelper.php
Expand Up @@ -55,7 +55,14 @@ public function getTypes(DocType $varType)

$varTypes = [];
for ($typeIndex = 0; $varType->has($typeIndex); ++$typeIndex) {
$varTypes[] = (string) $varType->get($typeIndex);
$nestedVarType = $varType->get($typeIndex);

if ($nestedVarType instanceof Nullable) {
$varTypes[] = (string) $nestedVarType->getActualType();
$nullable = true;
} else {
$varTypes[] = (string) $nestedVarType;
}
}

// If null is present, all types are nullable
Expand Down

0 comments on commit 2d708b3

Please sign in to comment.