function ClassMirror::hasDefaultValue
1 call to ClassMirror::hasDefaultValue()
- ClassMirror::reflectArgumentToNode in vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ Generator/ ClassMirror.php
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Doubler/ Generator/ ClassMirror.php, line 210
Class
- ClassMirror
- Class mirror. Core doubler class. Mirrors specific class and/or interfaces into class node tree.
Namespace
Prophecy\Doubler\GeneratorCode
private function hasDefaultValue(ReflectionParameter $parameter) : bool {
if ($parameter->isVariadic()) {
return false;
}
if ($parameter->isDefaultValueAvailable()) {
return true;
}
return $parameter->isOptional() || $parameter->allowsNull() && $parameter->getType() && \PHP_VERSION_ID < 80100;
}