Skip to content

Commit 30e7e8e

Browse files
staabmondrejmirtes
authored andcommitted
Faster ExpressionTypeHolder->equals()
1 parent c6b671c commit 30e7e8e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Analyser/ExpressionTypeHolder.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public static function createMaybe(Expr $expr, Type $type): self
2626

2727
public function equals(self $other): bool
2828
{
29+
if ($this === $other) {
30+
return true;
31+
}
32+
2933
if (!$this->certainty->equals($other->certainty)) {
3034
return false;
3135
}

0 commit comments

Comments
 (0)