diff --git a/src/Infrastructure/Search/FilterableTermsUpdater.php b/src/Infrastructure/Search/FilterableTermsUpdater.php index 1a2fbce..4080671 100644 --- a/src/Infrastructure/Search/FilterableTermsUpdater.php +++ b/src/Infrastructure/Search/FilterableTermsUpdater.php @@ -341,7 +341,7 @@ private function retrieveParentTermId( return 0; } - /** @var AdmissionRequirement|Degree $flatProperty */ + /** @var AdmissionRequirement|Degree|MultilingualLink $flatProperty */ $parentProperty = $flatProperty->parent(); if (is_null($parentProperty)) { @@ -403,7 +403,11 @@ private function isHierarchicalProperty( MultilingualString|MultilingualLink|AdmissionRequirement|Degree $flatProperty ): bool { - return $flatProperty instanceof Degree || $flatProperty instanceof AdmissionRequirement; + return in_array($flatProperty::class, [ + Degree::class, + AdmissionRequirement::class, + MultilingualLink::class, + ], true); } private function createTerm(TermData $termData): ?int