protected function loadExchangeRates($targetCurrency)
    {
        if (!isset($this->exchangeRates[$targetCurrency])) {
            $currencyRates = $this->currencyRateRepository->findBy(['currencyTo' => $targetCurrency]);
            if (count($currencyRates) === 0) {
                throw new MissingCurrencyRatesException($targetCurrency);
            }
            foreach ($currencyRates as $rate) {
                $this->setExchangeRate($rate, $targetCurrency);
            }
        }
    }
protected function loadExchangeRates($targetCurrency)
    {
        if (!isset($this->exchangeRates[$targetCurrency])) {
            $currencyRates = $this->currencyRateRepository->findBy(['currencyTo' => $targetCurrency]);
            if (count($currencyRates) === 0) {
                throw new MissingCurrencyRatesException($targetCurrency);
            }
            foreach ($currencyRates as $rate) {
                $this->setExchangeRate($rate, $targetCurrency);
            }
        }
    }
protected function loadExchangeRates ( $ targetCurrency ) { if ( ! isset ( $ this -> exchangeRates [ $ targetCurrency ] ) ) { $ currencyRates = $ this -> currencyRateRepository -> findBy ( [ 'currencyTo' => $ targetCurrency ] ) ; if ( count ( $ currencyRates ) === 0 ) { throw new MissingCurrencyRatesException ( $ targetCurrency ) ; } foreach ( $ currencyRates as $ rate ) { $ this -> setExchangeRate ( $ rate , $ targetCurrency ) ; } } }
Sets exchange rates for target currency

@param string $targetCurrency
Sets exchange rates for target currency