| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function quoteHistorical(\DateTimeInterface $dateTime, Currency $baseCurrency, Currency $counterCurrency) |
||
| 41 | { |
||
| 42 | try { |
||
| 43 | $rate = $this->swap->historical($baseCurrency->getCode().'/'.$counterCurrency->getCode(), $dateTime); |
||
| 44 | } catch (ExchangerException $e) { |
||
| 45 | throw UnresolvableCurrencyPairException::createFromCurrencies($baseCurrency, $counterCurrency); |
||
| 46 | } |
||
| 47 | |||
| 48 | return new CurrencyPair($baseCurrency, $counterCurrency, $rate->getValue()); |
||
| 49 | } |
||
| 50 | } |
||
| 51 |