/** * @param Money $other * @return bool */ public function isSameCurrency(Money $other) { return $this->currency->equals($other->currency); }
/** * @param CurrencyPair $other * @return boolean */ public function equals(CurrencyPair $other) { return $this->baseCurrency->equals($other->baseCurrency) && $this->counterCurrency->equals($other->counterCurrency) && $this->ratio === $other->ratio; }