Skip to content

Commit 1a4f8b3

Browse files
committed
More precise spaceship operator type
1 parent 701c8c9 commit 1a4f8b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Analyser/MutatingScope.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ private function resolveType(Expr $node): Type
10011001
}
10021002

10031003
if ($node instanceof Expr\BinaryOp\Spaceship) {
1004-
return new IntegerType();
1004+
return IntegerRangeType::fromInterval(-1, 1);
10051005
}
10061006

10071007
if ($node instanceof Expr\AssignOp\Coalesce) {

0 commit comments

Comments
 (0)