Replace method calls.

This commit is contained in:
James Cole
2025-09-10 16:07:19 +02:00
parent a3674c4dfe
commit cb0b42e44b
51 changed files with 87 additions and 91 deletions

View File

@@ -114,7 +114,7 @@ class FrontpageChartGenerator
*/
private function noBudgetLimits(array $data, Budget $budget): array
{
$spent = $this->opsRepository->sumExpenses($this->start, $this->end, null, new Collection([$budget]));
$spent = $this->opsRepository->sumExpenses($this->start, $this->end, null, new Collection()->push($budget));
/** @var array $entry */
foreach ($spent as $entry) {
@@ -158,7 +158,7 @@ class FrontpageChartGenerator
Log::debug(sprintf('Processing limit #%d with %s %s', $limit->id, $limit->transactionCurrency->code, $limit->amount));
}
$spent = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, null, new Collection([$budget]), $currency);
$spent = $this->opsRepository->sumExpenses($limit->start_date, $limit->end_date, null, new Collection()->push($budget), $currency);
Log::debug(sprintf('Spent array has %d entries.', count($spent)));
/** @var array $entry */