Big refactor to remove the deprecated transaction collector.

This commit is contained in:
James Cole
2019-05-30 12:31:19 +02:00
parent 10a6ff9bf8
commit 8b7e87ae57
117 changed files with 1314 additions and 1208 deletions

View File

@@ -58,7 +58,7 @@ class ChooseAccountsHandler implements BunqJobConfigurationInterface
{
$config = $this->repository->getConfiguration($this->importJob);
$mapping = $config['mapping'] ?? [];
$complete = \count($mapping) > 0;
$complete = count($mapping) > 0;
if (true === $complete) {
// move job to correct stage to download transactions
$this->repository->setStage($this->importJob, 'go-for-import');
@@ -94,10 +94,10 @@ class ChooseAccountsHandler implements BunqJobConfigurationInterface
*/
$ibanToAsset = [];
Log::debug('Going to map IBANs for easy mapping later on.');
if (0 === \count($accounts)) {
if (0 === count($accounts)) {
throw new FireflyException('No bunq accounts found. Import cannot continue.'); // @codeCoverageIgnore
}
if (0 === \count($mapping)) {
if (0 === count($mapping)) {
$messages = new MessageBag;
$messages->add('nomap', (string)trans('import.bunq_no_mapping'));
@@ -144,7 +144,7 @@ class ChooseAccountsHandler implements BunqJobConfigurationInterface
{
$config = $this->repository->getConfiguration($this->importJob);
$accounts = $config['accounts'] ?? [];
if (0 === \count($accounts)) {
if (0 === count($accounts)) {
throw new FireflyException('No bunq accounts found. Import cannot continue.'); // @codeCoverageIgnore
}
// list the users accounts: