. */ declare(strict_types=1); namespace FireflyIII\Import\Mapper; use FireflyIII\Repositories\Currency\CurrencyRepositoryInterface; /** * Class TransactionCurrencies. */ class TransactionCurrencies implements MapperInterface { /** * @return array */ public function getMap(): array { /** @var CurrencyRepositoryInterface $repository */ $repository = app(CurrencyRepositoryInterface::class); $currencies = $repository->get(); $list = []; foreach ($currencies as $currency) { $currencyId = intval($currency->id); $list[$currencyId] = $currency->name . ' (' . $currency->code . ')'; } $list = array_merge([0 => trans('import.map_do_not_map')], $list); return $list; } }