Skip to content

Commit 8e8efbb

Browse files
authored
fix: Union return type "mixed" is not nullable
1 parent 239ce42 commit 8e8efbb

File tree

1 file changed

+1
-1
lines changed
  • lib/internal/Magento/Framework/ObjectManager/Code/Generator

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/ObjectManager/Code/Generator/Proxy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ private function getReturnTypeValue(\ReflectionMethod $method): ?string
287287
$returnTypeValue = null;
288288
$returnType = $method->getReturnType();
289289
if ($returnType) {
290-
$returnTypeValue = ($returnType->allowsNull() ? '?' : '');
290+
$returnTypeValue = ($returnType->allowsNull() && $returnType->getName() !== 'mixed' ? '?' : '');
291291
$returnTypeValue .= ($returnType->getName() === 'self')
292292
? $this->_getFullyQualifiedClassName($method->getDeclaringClass()->getName())
293293
: $returnType->getName();

0 commit comments

Comments
 (0)