public function equals(Money $money)
    {
        if (!$money instanceof MultiCurrencyMoney) {
            return false;
        }

        return $money->currency == $this->currency && $money->getAmount() == $this->getAmount();
    }
public function equals(Money $money)
    {
        if (!$money instanceof MultiCurrencyMoney) {
            return false;
        }

        return $money->currency == $this->currency && $money->getAmount() == $this->getAmount();
    }
public function equals ( Money $ money ) { if ( ! $ money instanceof MultiCurrencyMoney ) { return false ; } return $ money -> currency == $ this -> currency && $ money -> getAmount ( ) == $ this -> getAmount ( ) ; }
Tests if two objects are of equal value.

TODO: optionally supply a bank object to do a
currency conversion for an equals check?

@param Money $money
@return bool
Tests if two objects are of equal value .