Skip to content

Commit

Permalink
Merge pull request #314 from goaop/fix/nullable-parameter-70
Browse files Browse the repository at this point in the history
Fix nullable parameter handling for 7.0
  • Loading branch information
lisachenko authored Jan 15, 2017
2 parents ca1fcc0 + 8ebaa0c commit cf3c15e
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 cf3c15e

Please sign in to comment.