mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup.
This commit is contained in:
@@ -91,7 +91,7 @@ class BudgetReportHelper implements BudgetReportHelperInterface
|
||||
'id' => $budget->id,
|
||||
'name' => $budget->name,
|
||||
|
||||
'budgeted' => strval($budgetLimit->amount),
|
||||
'budgeted' => (string)$budgetLimit->amount,
|
||||
'spent' => $data['expenses'],
|
||||
'left' => $data['left'],
|
||||
'overspent' => $data['overspent'],
|
||||
|
@@ -75,9 +75,8 @@ class PopupReport implements PopupReportInterface
|
||||
/** @var JournalCollectorInterface $collector */
|
||||
$collector = app(JournalCollectorInterface::class);
|
||||
$collector->setAccounts(new Collection([$account]))->setRange($attributes['startDate'], $attributes['endDate'])->setBudget($budget);
|
||||
$journals = $collector->getJournals();
|
||||
|
||||
return $journals;
|
||||
return $collector->getJournals();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,9 +117,8 @@ class PopupReport implements PopupReportInterface
|
||||
if (null !== $budget->id) {
|
||||
$collector->setBudget($budget);
|
||||
}
|
||||
$journals = $collector->getJournals();
|
||||
|
||||
return $journals;
|
||||
return $collector->getJournals();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,9 +134,8 @@ class PopupReport implements PopupReportInterface
|
||||
$collector->setAccounts($attributes['accounts'])->setTypes([TransactionType::WITHDRAWAL, TransactionType::TRANSFER])
|
||||
->setRange($attributes['startDate'], $attributes['endDate'])->withOpposingAccount()
|
||||
->setCategory($category);
|
||||
$journals = $collector->getJournals();
|
||||
|
||||
return $journals;
|
||||
return $collector->getJournals();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -90,8 +90,8 @@ class ReportHelper implements ReportHelperInterface
|
||||
$billLine->setBill($bill);
|
||||
$billLine->setPayDate($payDate);
|
||||
$billLine->setEndOfPayDate($endOfPayPeriod);
|
||||
$billLine->setMin(strval($bill->amount_min));
|
||||
$billLine->setMax(strval($bill->amount_max));
|
||||
$billLine->setMin((string)$bill->amount_min);
|
||||
$billLine->setMax((string)$bill->amount_max);
|
||||
$billLine->setHit(false);
|
||||
$entry = $journals->filter(
|
||||
function (Transaction $transaction) use ($bill) {
|
||||
@@ -119,7 +119,6 @@ class ReportHelper implements ReportHelperInterface
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return array
|
||||
* @throws \InvalidArgumentException
|
||||
*/
|
||||
public function listOfMonths(Carbon $date): array
|
||||
{
|
||||
|
Reference in New Issue
Block a user