Skip to content

Commit

Permalink
Fixed nullable parameter handling for 7.0, resolves #312
Browse files Browse the repository at this point in the history
  • Loading branch information
lisachenko committed Jan 15, 2017
1 parent ca1fcc0 commit 8ebaa0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Proxy/AbstractProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ protected function getParameterCode(ReflectionParameter $parameter)
if (PHP_VERSION_ID >= 70000) {
$reflectionType = $parameter->getType();
if ($reflectionType) {
$nullablePrefix = $reflectionType->allowsNull() ? '?' : '';
$nullablePrefix = (PHP_VERSION_ID >= 70100 && $reflectionType->allowsNull()) ? '?' : '';
$nsPrefix = $reflectionType->isBuiltin() ? '' : '\\';
$type = $nullablePrefix . $nsPrefix . (string) $reflectionType;
}
Expand Down

0 comments on commit 8ebaa0c

Please sign in to comment.