mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 08:35:00 +00:00
PHPStorm can order methods by alphabet, who knew.
This commit is contained in:
@@ -150,6 +150,14 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
return null;
|
||||
}
|
||||
|
||||
private function countJournals(TransactionCurrency $currency): int
|
||||
{
|
||||
$count = $currency->transactions()->whereNull('deleted_at')->count() + $currency->transactionJournals()->whereNull('deleted_at')->count();
|
||||
|
||||
// also count foreign:
|
||||
return $count + Transaction::where('foreign_currency_id', $currency->id)->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns ALL currencies, regardless of whether they are enabled or not.
|
||||
*/
|
||||
@@ -372,12 +380,4 @@ class CurrencyRepository implements CurrencyRepositoryInterface
|
||||
|
||||
return $service->update($currency, $data);
|
||||
}
|
||||
|
||||
private function countJournals(TransactionCurrency $currency): int
|
||||
{
|
||||
$count = $currency->transactions()->whereNull('deleted_at')->count() + $currency->transactionJournals()->whereNull('deleted_at')->count();
|
||||
|
||||
// also count foreign:
|
||||
return $count + Transaction::where('foreign_currency_id', $currency->id)->count();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user