Skip to content

Commit 1f61df8

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/Async/Code/Generator/ProxyDeferredGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private function getReturnTypeValue(\ReflectionMethod $method): ?string
246246
$returnTypeValue = null;
247247
$returnType = $method->getReturnType();
248248
if ($returnType) {
249-
$returnTypeValue = ($returnType->allowsNull() ? '?' : '');
249+
$returnTypeValue = ($returnType->allowsNull() && $returnType->getName() !== 'mixed' ? '?' : '');
250250
$returnTypeValue .= ($returnType->getName() === 'self')
251251
? $this->_getFullyQualifiedClassName($method->getDeclaringClass()->getName())
252252
: $returnType->getName();

0 commit comments

Comments
 (0)