public function check($budgets, \DateTimeImmutable $date)
    {
        foreach ($budgets as $budget) {
            $this->checkBudget($budget, $date);

            if ($budget->hasChildren()) {
                foreach ($budget->getChildren() as $child) {
                    $this->checkBudget($child, $date);
                }
            }
        }
    }