, * family_total: float, * billable_count: int, * non_billable_count: int, * students: array> * } */ public function calculate(array $students): array { $schoolYear = $this->config->getSchoolYear(); $breakdown = $this->studentFees->calculateBreakdown($students); Log::info('Tuition calculation requested', [ 'school_year' => $schoolYear, 'student_count' => count($students), 'family_total' => $breakdown['family_total'], ]); return [ 'school_year' => $schoolYear, 'fees' => $breakdown['fees'], 'family_total' => $breakdown['family_total'], 'billable_count' => $breakdown['billable_count'], 'non_billable_count' => $breakdown['non_billable_count'], 'students' => $breakdown['students'], ]; } /** * Convenience helper: the family-level tuition total only. */ public function familyTotal(array $students): float { return $this->calculate($students)['family_total']; } }