/home/techb158/immovalet.com/vendor/moneyphp/money/src/Exchange
NameSizeModeActions
ExchangerExchange.php14170644editdlrm
FixedExchange.php10410644editdlrm
IndirectExchange.php58280644editdlrm
ReversedCurrenciesExchange.php12920644editdlrm
SwapExchange.php11010644editdlrm
Edit: /home/techb158/immovalet.com/vendor/moneyphp/money/src/Exchange/SwapExchange.php (1101B)
*/ final class SwapExchange implements Exchange { /** * @var Swap */ private $swap; /** * @param Swap $swap */ public function __construct(Swap $swap) { $this->swap = $swap; } /** * {@inheritdoc} */ public function quote(Currency $baseCurrency, Currency $counterCurrency) { try { $rate = $this->swap->latest($baseCurrency->getCode().'/'.$counterCurrency->getCode()); } catch (ExchangerException $e) { throw UnresolvableCurrencyPairException::createFromCurrencies($baseCurrency, $counterCurrency); } return new CurrencyPair($baseCurrency, $counterCurrency, $rate->getValue()); } }