/**
* @inheritdoc
*/
public function getFor(Currency $currency)
{
if ($currency->equals($this->baseCurrency)) {
// fixer.io doesn't support same currencies, but we don't want it to break because of just that.
$this->exchangeRates[$currency->getName()] = (double) 1;
} else {
$this->retrieveExchangeRateFor($currency);
}
return $this->exchangeRates[$currency->getName()];
}