From 841652d815093dedadd0a57652fe9eef7e735428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Mi=C5=A1o=20=C4=8Cerve=C5=88=C3=A1k?= Date: Sun, 27 Oct 2024 20:26:39 +0100 Subject: [PATCH] fix === --- src/Price/Price.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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();