From 564d17b08aeabc89b5a5fd4e57320f0c521e0218 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 23 Oct 2023 13:14:13 +0200 Subject: [PATCH] ObjectSuggestions: Remove superflous code --- .../Notifications/Web/Control/SearchBar/ObjectSuggestions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php b/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php index 97cf8f311..705952f26 100644 --- a/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php +++ b/library/Notifications/Web/Control/SearchBar/ObjectSuggestions.php @@ -170,7 +170,6 @@ public static function collectFilterColumns(Model $model, Resolver $resolver): T self::collectRelations($resolver, $model, $models, []); foreach ($models as $path => $targetModel) { - /** @var Model $targetModel */ foreach ($resolver->getColumnDefinitions($targetModel) as $columnName => $definition) { yield $path . '.' . $columnName => $definition->getLabel(); } @@ -195,7 +194,7 @@ protected static function collectRelations(Resolver $resolver, Model $subject, a $isHasOne = $relation instanceof HasOne; if (empty($path)) { $relationPath = [$name]; - if ($isHasOne && empty($path)) { + if ($isHasOne) { array_unshift($relationPath, $subject->getTableName()); }