src/Currency.php
public function is($currency) : bool
    {
        if ($currency instanceof Currency) {
            return $this->currencyCode === $currency->currencyCode;
        }

        return $this->currencyCode === (string) $currency
            || ($this->numericCode !== 0 && $this->numericCode === (int) $currency);
    }
public function is($currency) : bool
    {
        if ($currency instanceof Currency) {
            return $this->currencyCode === $currency->currencyCode;
        }

        return $this->currencyCode === (string) $currency
            || ($this->numericCode !== 0 && $this->numericCode === (int) $currency);
    }
public function is ( $ currency ) : bool { if ( $ currency instanceof Currency ) { return $ this -> currencyCode === $ currency -> currencyCode ; } return $ this -> currencyCode === ( string ) $ currency || ( $ this -> numericCode !== 0 && $ this -> numericCode === ( int ) $ currency ) ; }
Returns whether this currency is equal to the given currency.

The currencies are considered equal if their currency codes are equal.

@param Currency|string|int $currency The Currency instance, currency code or numeric currency code.

@return bool
Returns whether this currency is equal to the given currency .