mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Moved getAccountsByType
This commit is contained in:
@@ -13,9 +13,9 @@ declare(strict_types = 1);
|
||||
|
||||
namespace FireflyIII\Import\Mapper;
|
||||
|
||||
use FireflyIII\Crud\Account\AccountCrudInterface;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
|
||||
/**
|
||||
* Class OpposingAccounts
|
||||
@@ -30,16 +30,16 @@ class OpposingAccounts implements MapperInterface
|
||||
*/
|
||||
public function getMap(): array
|
||||
{
|
||||
/** @var AccountCrudInterface $crud */
|
||||
$crud = app(AccountCrudInterface::class);
|
||||
$set = $crud->getAccountsByType(
|
||||
/** @var AccountRepositoryInterface $accountRepository */
|
||||
$accountRepository = app(AccountRepositoryInterface::class);
|
||||
$set = $accountRepository->getAccountsByType(
|
||||
[
|
||||
AccountType::DEFAULT, AccountType::ASSET,
|
||||
AccountType::EXPENSE, AccountType::BENEFICIARY,
|
||||
AccountType::REVENUE,
|
||||
]
|
||||
);
|
||||
$list = [];
|
||||
$list = [];
|
||||
|
||||
/** @var Account $account */
|
||||
foreach ($set as $account) {
|
||||
|
Reference in New Issue
Block a user