/** * @inheritdoc */ public function isSameCurrency(Money $money) { if ($this->getCurrency()->getAlpha3() !== $money->getCurrency()->getAlpha3()) { return false; } return true; }
/** * Gets tax value between net and gross price * @return Money */ public function getTaxValue() { return $this->grossPrice->subtract($this->netPrice); }
/** * @dataProvider getCurrencyMismatchData * @expectedException \Nilz\Money\Exception\CurrencyMismatchException */ public function testCompareToWithDifferentCurrenciesFails(Money $base, Money $compareObject) { $base->compareTo($compareObject); }