Code cleanup.

This commit is contained in:
James Cole
2023-12-20 19:35:52 +01:00
parent c4f6366642
commit 64ec0cf62e
997 changed files with 12908 additions and 28136 deletions

View File

@@ -31,11 +31,6 @@ use FireflyIII\Models\BudgetLimit;
*/
class BudgetObserver
{
/**
* @param Budget $budget
*
* @return void
*/
public function deleting(Budget $budget): void
{
app('log')->debug('Observe "deleting" of a budget.');
@@ -43,6 +38,7 @@ class BudgetObserver
$attachment->delete();
}
$budgetLimits = $budget->budgetlimits()->get();
/** @var BudgetLimit $budgetLimit */
foreach($budgetLimits as $budgetLimit) {
// this loop exists so several events are fired.
@@ -53,7 +49,5 @@ class BudgetObserver
$budget->autoBudgets()->delete();
// recalculate available budgets.
}
}