Skip to content

Commit

Permalink
More precise spaceship operator type
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 9, 2020
1 parent 701c8c9 commit 1a4f8b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Analyser/MutatingScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ private function resolveType(Expr $node): Type
}

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

if ($node instanceof Expr\AssignOp\Coalesce) {
Expand Down

0 comments on commit 1a4f8b3

Please sign in to comment.