mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 10:53:31 +00:00
Fix phpstan level 3!
This commit is contained in:
@@ -250,6 +250,7 @@ class BillUpdateService
|
||||
|
||||
private function getRuleTrigger(Rule $rule, string $key): ?RuleTrigger
|
||||
{
|
||||
/** @var RuleTrigger|null */
|
||||
return $rule->ruleTriggers()->where('trigger_type', $key)->first();
|
||||
}
|
||||
}
|
||||
|
@@ -238,11 +238,9 @@ class JournalUpdateService
|
||||
private function getSourceTransaction(): Transaction
|
||||
{
|
||||
if (null === $this->sourceTransaction) {
|
||||
$this->sourceTransaction = $this->transactionJournal->transactions()->with(['account'])->where(
|
||||
'amount',
|
||||
'<',
|
||||
0
|
||||
)->first();
|
||||
/** @var Transaction|null $result */
|
||||
$result = $this->transactionJournal->transactions()->with(['account'])->where('amount', '<', 0)->first();
|
||||
$this->sourceTransaction = $result;
|
||||
}
|
||||
Log::debug(sprintf('getSourceTransaction: %s', $this->sourceTransaction->amount));
|
||||
|
||||
@@ -321,7 +319,9 @@ class JournalUpdateService
|
||||
private function getDestinationTransaction(): Transaction
|
||||
{
|
||||
if (null === $this->destinationTransaction) {
|
||||
$this->destinationTransaction = $this->transactionJournal->transactions()->where('amount', '>', 0)->first();
|
||||
/** @var Transaction|null $result */
|
||||
$result = $this->transactionJournal->transactions()->where('amount', '>', 0)->first();
|
||||
$this->destinationTransaction = $result;
|
||||
}
|
||||
|
||||
return $this->destinationTransaction;
|
||||
|
Reference in New Issue
Block a user