mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Expand tests, do code cleanup.
This commit is contained in:
@@ -27,6 +27,11 @@ use FireflyIII\Models\CurrencyExchangeRate;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\User;
|
||||
|
||||
/**
|
||||
* Interface ExchangeRateInterface
|
||||
*
|
||||
* @package FireflyIII\Services\Currency
|
||||
*/
|
||||
interface ExchangeRateInterface
|
||||
{
|
||||
/**
|
||||
|
||||
@@ -38,6 +38,13 @@ class FixerIO implements ExchangeRateInterface
|
||||
/** @var User */
|
||||
protected $user;
|
||||
|
||||
/**
|
||||
* @param TransactionCurrency $fromCurrency
|
||||
* @param TransactionCurrency $toCurrency
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return CurrencyExchangeRate
|
||||
*/
|
||||
public function getRate(TransactionCurrency $fromCurrency, TransactionCurrency $toCurrency, Carbon $date): CurrencyExchangeRate
|
||||
{
|
||||
$uri = sprintf('https://api.fixer.io/%s?base=%s&symbols=%s', $date->format('Y-m-d'), $fromCurrency->code, $toCurrency->code);
|
||||
|
||||
Reference in New Issue
Block a user