Skip to content

Commit ce1f2bf

Browse files
committed
min/max fix
1 parent 977f2b4 commit ce1f2bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Type/Php/MinMaxFunctionReturnTypeExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ private function processType(
160160
}
161161

162162
$compareResult = $this->compareTypes($resultType, $type);
163+
if ($compareResult === null) {
164+
return TypeCombinator::union(...$types);
165+
}
166+
163167
if ($functionName === 'min') {
164168
if ($compareResult === $type) {
165169
$resultType = $type;

0 commit comments

Comments
 (0)