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.
1 parent b205d07 commit 6f3faebCopy full SHA for 6f3faeb
src/Test/ResultMockFactory.php
@@ -149,13 +149,11 @@ private static function addUndefinedProperties(\ReflectionClass $reflectionClass
149
}
150
151
$getter = $reflectionClass->getMethod('get' . $property->getName());
152
- /** @psalm-suppress PossiblyNullReference */
153
- if (!$getter->hasReturnType() || $getter->getReturnType()->allowsNull()) {
+ if (!$getter->hasReturnType() || (!($type = $getter->getReturnType()) instanceof \ReflectionNamedType) || $type->allowsNull()) {
154
continue;
155
156
157
158
- switch ($getter->getReturnType()->getName()) {
+ switch ($type->getName()) {
159
case 'int':
160
$propertyValue = 0;
161
0 commit comments