diff options
Diffstat (limited to 'lib/private/Search/SearchComposer.php')
-rw-r--r-- | lib/private/Search/SearchComposer.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Search/SearchComposer.php b/lib/private/Search/SearchComposer.php index d23662f7055..71fd003717c 100644 --- a/lib/private/Search/SearchComposer.php +++ b/lib/private/Search/SearchComposer.php @@ -10,6 +10,7 @@ namespace OC\Search; use InvalidArgumentException; use OC\AppFramework\Bootstrap\Coordinator; +use OC\Core\ResponseDefinitions; use OCP\IURLGenerator; use OCP\IUser; use OCP\Search\FilterDefinition; @@ -43,6 +44,7 @@ use function array_map; * results are awaited or shown as they come in. * * @see IProvider::search() for the arguments of the individual search requests + * @psalm-import-type CoreUnifiedSearchProvider from ResponseDefinitions */ class SearchComposer { /** @@ -156,7 +158,7 @@ class SearchComposer { * @param string $route the route the user is currently at * @param array $routeParameters the parameters of the route the user is currently at * - * @return array + * @return list<CoreUnifiedSearchProvider> */ public function getProviders(string $route, array $routeParameters): array { $this->loadLazyProviders(); @@ -183,7 +185,7 @@ class SearchComposer { 'name' => $provider->getName(), 'icon' => $this->fetchIcon($appId, $provider->getId()), 'order' => $order, - 'triggers' => $triggers, + 'triggers' => array_values($triggers), 'filters' => $this->getFiltersType($filters, $provider->getId()), 'inAppSearch' => $provider instanceof IInAppSearch, ]; |