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