Refactor to remove deprecated methods.

This commit is contained in:
James Cole
2020-11-08 14:06:49 +01:00
parent 7efb77e000
commit d268931187
7 changed files with 7 additions and 175 deletions

View File

@@ -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.

View File

@@ -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.
*