tenantRepository ??= new TenantRepository(); } public function createDepartmentRepository(): DepartmentRepositoryInterface { return $this->departmentRepository ??= new DepartmentRepository(); } public function createUserTenantRepository(): UserTenantRepositoryInterface { return $this->userTenantRepository ??= new UserTenantRepository(); } }