diff --git a/src/Analyser/ExpressionTypeHolder.php b/src/Analyser/ExpressionTypeHolder.php index a3ea8273e6..f343ffe6ca 100644 --- a/src/Analyser/ExpressionTypeHolder.php +++ b/src/Analyser/ExpressionTypeHolder.php @@ -35,15 +35,15 @@ public function equals(self $other): bool public function and(self $other): self { - if ($this->getType()->equals($other->getType())) { - $type = $this->getType(); + if ($this->type->equals($other->type)) { + $type = $this->type; } else { - $type = TypeCombinator::union($this->getType(), $other->getType()); + $type = TypeCombinator::union($this->type, $other->type); } return new self( $this->expr, $type, - $this->getCertainty()->and($other->getCertainty()), + $this->certainty->and($other->certainty), ); }