mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Remove static references
This commit is contained in:
@@ -65,13 +65,13 @@ class ConvertToDeposit implements ActionInterface
|
||||
/** @var TransactionJournal|null $object */
|
||||
$object = TransactionJournal::where('user_id', $journal['user_id'])->find($journal['transaction_journal_id']);
|
||||
if (null === $object) {
|
||||
Log::error(sprintf('Cannot find journal #%d, cannot convert to deposit.', $journal['transaction_journal_id']));
|
||||
app('log')->error(sprintf('Cannot find journal #%d, cannot convert to deposit.', $journal['transaction_journal_id']));
|
||||
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.journal_not_found')));
|
||||
return false;
|
||||
}
|
||||
$groupCount = TransactionJournal::where('transaction_group_id', $journal['transaction_group_id'])->count();
|
||||
if ($groupCount > 1) {
|
||||
Log::error(sprintf('Group #%d has more than one transaction in it, cannot convert to deposit.', $journal['transaction_group_id']));
|
||||
app('log')->error(sprintf('Group #%d has more than one transaction in it, cannot convert to deposit.', $journal['transaction_group_id']));
|
||||
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.split_group')));
|
||||
return false;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ class ConvertToDeposit implements ActionInterface
|
||||
Log::debug(sprintf('Convert journal #%d to deposit.', $journal['transaction_journal_id']));
|
||||
$type = $object->transactionType->type;
|
||||
if (TransactionType::DEPOSIT === $type) {
|
||||
Log::error(sprintf('Journal #%d is already a deposit (rule #%d).', $journal['transaction_journal_id'], $this->action->rule_id));
|
||||
app('log')->error(sprintf('Journal #%d is already a deposit (rule #%d).', $journal['transaction_journal_id'], $this->action->rule_id));
|
||||
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.is_already_deposit')));
|
||||
return false;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class ConvertToDeposit implements ActionInterface
|
||||
$res = $this->convertWithdrawalArray($object);
|
||||
} catch (JsonException | FireflyException $e) {
|
||||
Log::debug('Could not convert withdrawal to deposit.');
|
||||
Log::error($e->getMessage());
|
||||
app('log')->error($e->getMessage());
|
||||
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.complex_error')));
|
||||
return false;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ class ConvertToDeposit implements ActionInterface
|
||||
$res = $this->convertTransferArray($object);
|
||||
} catch (JsonException | FireflyException $e) {
|
||||
Log::debug('Could not convert transfer to deposit.');
|
||||
Log::error($e->getMessage());
|
||||
app('log')->error($e->getMessage());
|
||||
event(new RuleActionFailedOnArray($this->action, $journal, trans('rules.complex_error')));
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user