mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup for scrutinizer.
This commit is contained in:
@@ -168,8 +168,8 @@ class JournalCollector implements JournalCollectorInterface
|
||||
$q1->where(
|
||||
function (EloquentBuilder $q2) use ($amount) {
|
||||
// amount < 0 and .amount > -$amount
|
||||
$amount = bcmul($amount, '-1');
|
||||
$q2->where('transactions.amount', '<', 0)->where('transactions.amount', '>', $amount);
|
||||
$invertedAmount = bcmul($amount, '-1');
|
||||
$q2->where('transactions.amount', '<', 0)->where('transactions.amount', '>', $invertedAmount);
|
||||
}
|
||||
)
|
||||
->orWhere(
|
||||
@@ -196,8 +196,8 @@ class JournalCollector implements JournalCollectorInterface
|
||||
$q1->where(
|
||||
function (EloquentBuilder $q2) use ($amount) {
|
||||
// amount < 0 and .amount < -$amount
|
||||
$amount = bcmul($amount, '-1');
|
||||
$q2->where('transactions.amount', '<', 0)->where('transactions.amount', '<', $amount);
|
||||
$invertedAmount = bcmul($amount, '-1');
|
||||
$q2->where('transactions.amount', '<', 0)->where('transactions.amount', '<', $invertedAmount);
|
||||
}
|
||||
)
|
||||
->orWhere(
|
||||
|
Reference in New Issue
Block a user