mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Refactor to remove deprecated methods.
This commit is contained in:
@@ -196,24 +196,6 @@ class GroupCollector implements GroupCollectorInterface
|
||||
return new LengthAwarePaginator($set, $this->total, $this->limit, $this->page);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the sum of all journals.
|
||||
* TODO ignores the currency.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSum(): string
|
||||
{
|
||||
$journals = $this->getExtractedJournals();
|
||||
$sum = '0';
|
||||
/** @var array $journal */
|
||||
foreach ($journals as $journal) {
|
||||
$amount = (string) $journal['amount'];
|
||||
$sum = bcadd($sum, $amount);
|
||||
}
|
||||
|
||||
return $sum;
|
||||
}
|
||||
|
||||
/**
|
||||
* Limit results to a specific currency, either foreign or normal one.
|
||||
|
@@ -105,13 +105,6 @@ interface GroupCollectorInterface
|
||||
*/
|
||||
public function getPaginatedGroups(): LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* Return the sum of all journals.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getSum(): string;
|
||||
|
||||
/**
|
||||
* Define which accounts can be part of the source and destination transactions.
|
||||
*
|
||||
|
Reference in New Issue
Block a user