Skip to content

Commit 3f40c9d

Browse files
committed
Fix CallableTypeHelper
1 parent ff8ad7e commit 3f40c9d

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/Type/CallableTypeHelper.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,7 @@ public static function isParametersAcceptorSuperTypeOf(
9595

9696
$theirReturnType = $theirs->getReturnType();
9797
if ($treatMixedAsAny) {
98-
if (
99-
$theirReturnType instanceof MixedType
100-
&& !$theirReturnType instanceof TemplateMixedType
101-
) {
102-
$isReturnTypeSuperType = new AcceptsResult(TrinaryLogic::createYes(), []);
103-
} elseif ($theirReturnType instanceof BenevolentUnionType) {
104-
$isReturnTypeSuperType = $ours->getReturnType()->acceptsWithReason($theirReturnType, true);
105-
} else {
106-
$isReturnTypeSuperType = new AcceptsResult($ours->getReturnType()->isSuperTypeOf($theirReturnType), []);
107-
}
98+
$isReturnTypeSuperType = $ours->getReturnType()->acceptsWithReason($theirReturnType, true);
10899
} else {
109100
$isReturnTypeSuperType = new AcceptsResult($ours->getReturnType()->isSuperTypeOf($theirReturnType), []);
110101
}

0 commit comments

Comments
 (0)