diff --git a/src/Price/Price.php b/src/Price/Price.php index 26554ed..354ae1e 100644 --- a/src/Price/Price.php +++ b/src/Price/Price.php @@ -20,7 +20,7 @@ public function __construct( */ public function add(Price $price): void { - if ($this->currency->value !== $price->getCurrency()->value) { + if ($this->currency !== $price->getCurrency()) { throw new \LogicException('Currencies are not a same'); } $this->amount += $price->getAmount();