src/RunOpenCode/ExchangeRate/Processor/BaseCurrencyValidator.php
public function process($baseCurrencyCode, RatesConfigurationRegistryInterface $configurations, array $rates)
    {
        $baseCurrencyCode = CurrencyCodeUtil::clean($baseCurrencyCode);

        /**
         * @var RateInterface $rate
         */
        foreach ($rates as $rate) {

            if ($baseCurrencyCode !== $rate->getBaseCurrencyCode()) {
                throw new ConfigurationException(sprintf('Invalid base currency code "%s" of rate "%s" from source "%s" is not calculated.', $rate->getBaseCurrencyCode(), $rate->getCurrencyCode(), $rate->getSourceName()));
            }
        }

        return $rates;
    }
public function process($baseCurrencyCode, RatesConfigurationRegistryInterface $configurations, array $rates)
    {
        $baseCurrencyCode = CurrencyCodeUtil::clean($baseCurrencyCode);

        /**
         * @var RateInterface $rate
         */
        foreach ($rates as $rate) {

            if ($baseCurrencyCode !== $rate->getBaseCurrencyCode()) {
                throw new ConfigurationException(sprintf('Invalid base currency code "%s" of rate "%s" from source "%s" is not calculated.', $rate->getBaseCurrencyCode(), $rate->getCurrencyCode(), $rate->getSourceName()));
            }
        }

        return $rates;
    }
{@inheritdoc}