We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1cf13fd + b14ce9e commit 38e8fbbCopy full SHA for 38e8fbb
src/PhpGenerator/Parameter.php
@@ -55,7 +55,7 @@ public static function from(\ReflectionParameter $from)
55
}
56
57
58
- $param->optional = PHP_VERSION_ID < 50407 ? $from->isOptional() || ($param->typeHint && $from->allowsNull()) : $from->isDefaultValueAvailable();
+ $param->optional = $from->isDefaultValueAvailable();
59
$param->defaultValue = $from->isDefaultValueAvailable() ? $from->getDefaultValue() : NULL;
60
61
$namespace = $from->getDeclaringClass() ? $from->getDeclaringClass()->getNamespaceName() : NULL;
0 commit comments