Money\Money::assertSameCurrencyAs PHP Method

assertSameCurrencyAs() private method

Asserts that a Money has the same currency as this
private assertSameCurrencyAs ( Money $other )
$other Money
    private function assertSameCurrencyAs(Money $other)
    {
        if (!$this->hasSameCurrencyAs($other)) {
            throw new InvalidArgumentException('Currencies must be identical');
        }
    }