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());
 }