*/ private array $reports = []; public function __construct(private User $user) { } public function getUser(): User { return $this->user; } public function addReport(ReportInterface $report): ReportingEvent { $this->reports[$report->getId()] = $report; return $this; } /** * @return array */ public function getReports(): array { return array_values($this->reports); } }