apiAuditLogRepository ??= new ApiAuditLogRepository(); } public function createUserLifecycleAuditRepository(): UserLifecycleAuditRepository { return $this->userLifecycleAuditRepository ??= new UserLifecycleAuditRepository(); } public function createApiAuditService(): ApiAuditService { return $this->apiAuditService ??= new ApiAuditService($this->createApiAuditLogRepository()); } public function createUserLifecycleAuditService(): UserLifecycleAuditService { return $this->userLifecycleAuditService ??= new UserLifecycleAuditService( $this->createUserLifecycleAuditRepository() ); } }