Various code cleanup.

This commit is contained in:
James Cole
2021-04-07 07:28:43 +02:00
parent 4ddcb0c965
commit f12744ad8c
180 changed files with 714 additions and 721 deletions

View File

@@ -55,14 +55,14 @@ class AddTag implements ActionInterface
$factory = app(TagFactory::class);
$factory->setUser(User::find($journal['user_id']));
$tag = $factory->findOrCreate($this->action->action_value);
// @codeCoverageIgnoreStart
if (null === $tag) {
// could not find, could not create tag.
Log::error(sprintf('RuleAction AddTag. Could not find or create tag "%s"', $this->action->action_value));
return false;
}
// @codeCoverageIgnoreEnd
$count = DB::table('tag_transaction_journal')
->where('tag_id', $tag->id)
->where('transaction_journal_id', $journal['transaction_journal_id'])

View File

@@ -91,7 +91,7 @@ class ConvertToTransfer implements ActionInterface
return $this->convertDepositArray($journal, $asset);
}
return false; // @codeCoverageIgnore
return false;
}
/**

View File

@@ -73,7 +73,7 @@ class ConvertToWithdrawal implements ActionInterface
return $this->convertTransferArray($journal);
}
return false; // @codeCoverageIgnore
return false;
}
private function convertDepositArray(array $journal): bool