Moved getAccountsByType

This commit is contained in:
James Cole
2016-10-10 07:49:39 +02:00
parent e8a095e543
commit de6f838413
25 changed files with 215 additions and 202 deletions

View File

@@ -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) {