. */ 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 = (int)$currency->id; $list[$currencyId] = $currency->name . ' (' . $currency->code . ')'; } asort($list); $list = [0 => trans('import.map_do_not_map')] + $list; return $list; } }