mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Big refactor to remove the deprecated transaction collector.
This commit is contained in:
@@ -59,7 +59,7 @@ class SelectAccountsHandler implements YnabJobConfigurationInterface
|
||||
Log::debug('Now in SelectAccountsHandler::configurationComplete()');
|
||||
$config = $this->importJob->configuration;
|
||||
$mapping = $config['mapping'] ?? [];
|
||||
if (\count($mapping) > 0) {
|
||||
if (count($mapping) > 0) {
|
||||
// mapping is complete.
|
||||
Log::debug('Looks like user has mapped YNAB accounts to Firefly III accounts', $mapping);
|
||||
$this->repository->setStage($this->importJob, 'go-for-import');
|
||||
@@ -97,7 +97,7 @@ class SelectAccountsHandler implements YnabJobConfigurationInterface
|
||||
$config['mapping'] = $final;
|
||||
$config['apply-rules'] = $applyRules;
|
||||
$this->repository->setConfiguration($this->importJob, $config);
|
||||
if ($final === ['' => 0] || 0 === \count($final)) {
|
||||
if ($final === ['' => 0] || 0 === count($final)) {
|
||||
$messages->add('count', (string)trans('import.ynab_no_mapping'));
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class SelectAccountsHandler implements YnabJobConfigurationInterface
|
||||
$config = $this->importJob->configuration;
|
||||
$ynabAccounts = $config['accounts'] ?? [];
|
||||
$budget = $this->getSelectedBudget();
|
||||
if (0 === \count($ynabAccounts)) {
|
||||
if (0 === count($ynabAccounts)) {
|
||||
throw new FireflyException('It seems you have no accounts with this budget. The import cannot continue.'); // @codeCoverageIgnore
|
||||
}
|
||||
// list the users accounts:
|
||||
|
@@ -104,7 +104,7 @@ class SelectBudgetHandler implements YnabJobConfigurationInterface
|
||||
$budgets = $configuration['budgets'] ?? [];
|
||||
$available = [];
|
||||
$notAvailable = [];
|
||||
$total = \count($budgets);
|
||||
$total = count($budgets);
|
||||
foreach ($budgets as $budget) {
|
||||
if ($this->haveAssetWithCurrency($budget['currency_code'])) {
|
||||
Log::debug('Add budget to available list.');
|
||||
|
Reference in New Issue
Block a user