Skip to content

Commit

Permalink
#751 fix - using isDefaultValueAvailable instead of isOptional co…
Browse files Browse the repository at this point in the history
…rrectly reports the type of the parameter
  • Loading branch information
Ocramius committed Dec 2, 2016
1 parent 8084096 commit 5f27b7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Doctrine/Common/Proxy/ProxyGenerator.php
Expand Up @@ -1083,7 +1083,7 @@ private function formatType(
}

if ($type->allowsNull()
&& (null === $parameter || ! $parameter->isOptional() || null !== $parameter->getDefaultValue())
&& (null === $parameter || ! $parameter->isDefaultValueAvailable() || null !== $parameter->getDefaultValue())
) {
$name = '?' . $name;
}
Expand Down

0 comments on commit 5f27b7f

Please sign in to comment.