Check the equality of two Money objects.
First check the currency and then check the value.

@param PhilipBrown\Money\Money
@return bool
496620
public function equals(Money $money)
  {
    return $this->isSameCurrency($money) && $this->cents == $money->cents;
  }
487196
public static function checkCurrencyAvailabilityByIsoCode($currency_iso_code)
    {
        $available = false;
        if (array_search(strtoupper($currency_iso_code), self::$currencies)) {
            $available = true;
        }
        return $available;
    }
703122
public function isLt(MoneyInterface $first, MoneyInterface $second)
    {
        $this->resolveCurrency($first, $second);
        return $this->math->isLt($first->getAmount(), $second->getAmount());
    }
169925
public static function checkCurrency($currency, $allowedCurrencies = null)
    {
        $currencies = self::$_defaultAllowedCurrencies;
        if (isset($allowedCurrencies) && is_array($allowedCurrencies)) {
            $currencies = $allowedCurrencies;
        }

        if ($currency == null || $currency == '') {
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::MISSING_CURRENCY,
                'Currency cannot be none',
                'currency'
            );
        } else if (!in_array(strtolower($currency), $currencies)) {
            throw new HpsInvalidRequestException(
                HpsExceptionCodes::INVALID_CURRENCY,
                "'".strtolower($currency)."' is not a supported currency",
                'currency'
            );
        }
    }
855543
public function amount($money)
    {
        if (null === $money) {
            return null;
        }

        $cents = $money * 100;
        if (!is_numeric($money) || $money < 0) {
            throw new \InvalidArgumentException('money amount must be a positive number.');
        }

        return ($this->money_format() == 'cents')
            ? number_format($cents, 0, '', '')
            : number_format($money, 2);
    }
666451
public function equals($number): bool
    {
        if (!($number instanceof Number)) {
            return false;
        }
        
        return $this->number === $number->number;
    }
1034863
public function isLte(MoneyInterface $first, MoneyInterface $second)
    {
        $this->resolveCurrency($first, $second);
        return $this->math->isLte($first->getAmount(), $second->getAmount());
    }
476499
public function isEqual(MoneyInterface $first, MoneyInterface $second)
    {
        $this->resolveCurrency($first, $second);
        return $this->math->isEqual($first->getAmount(), $second->getAmount());
    }
855036
private function isSameAmount(Money $other)
    {
        return bccomp($this->getAmountString(), $other->getAmountString(), self::GAAP_PRECISION) === 0;
    }
297570
public function getUnitPriceInclVat(): ?Money
    {
        $unitPrice = $this->getUnitPrice();
        if (!$unitPrice) {
            return null;
        }

        $multiplier = BigDecimal::of('100')->plus($this->vatPct)->exactlyDividedBy('100');

        return $unitPrice->multiply((string) $multiplier);
    }
958424
def compare_balance(self, operator, or_equals, amount):
        """"""
        amount = int(amount)
        if operator == 'less':
            if or_equals:
                self.assertLessEqual(self.balance, amount)
            else:
                self.assertLess(self.balance, amount)
        elif or_equals:
            self.assertGreaterEqual(self.balance, amount)
        else:
            self.assertGreater(self.balance, amount)
495682
public function amount($money)
    {
        if (null === $money) {
            return;
        }

        if (is_string($money) || $money < 0) {
            throw new InvalidArgumentException('Money amount must be a positive number.');
        }

        if ($this->getMoneyFormat() === 'cents') {
            return number_format($money, 0, '', '');
        }

        return sprintf('%.2f', number_format($money, 2, '.', '') / 100);
    }
128133
public static function areNotEqual($value1, $value2): bool
    {
        if (static::isEquatable($value1) && static::areSameType($value1, $value2)) {
            return !$value1->equals($value2);
        }

        return $value1 != $value2;
    }
1223816
public function subtract(
        Fiat\Money $money1,
        Fiat\Money $money2
    ): Fiat\Money {
        return $this->accountant->subtract($money1, $money2);
    }
1046789
public function sameValueAs(ValueObjectInterface $currency)
    {
        if (false === Util::classEquals($this, $currency)) {
            return false;
        }

        return $this->getCode()->toNative() == $currency->getCode()->toNative();
    }
1106205
public function isEqual(Money $a, Money $b) : bool
    {
        return $this->compare($a, $b) === 0;
    }
532216
public function isGte(MoneyInterface $first, MoneyInterface $second)
    {
        $this->resolveCurrency($first, $second);
        return $this->math->isGte($first->getAmount(), $second->getAmount());
    }