equals() public method

Equality comparison between this object and $b
public equals ( Decimal $b, integer $scale = null ) : boolean
$b Decimal
$scale integer
return boolean
コード例 #1
0
ファイル: Money.php プロジェクト: coolms/money
 /**
  * Checks whether the value represented by this object equals to the other
  *
  * @param Money $money
  * @return bool
  */
 public function equals(Money $money)
 {
     return $this->isSameCurrency($money) && $this->amount->equals($money->amount, $this->getInnerPrecision());
 }