return $results;
}
+ protected function requireUser(ISearchQuery $searchQuery): IUser {
+ $user = $searchQuery->getUser();
+ if ($user === null) {
+ throw new \InvalidArgumentException("This search operation requires the user to be set in the query");
+ }
+ return $user;
+ }
+
/**
- * @return array{array<string, ICache>, array<string, IMountPoint>}
+ * @return list{0?: array<array-key, ICache>, 1?: array<array-key, IMountPoint>}
*/
- public function getCachesAndMountPointsForSearch(Root $root, string $path, bool $limitToHome = false): array {
+ public function getCachesAndMountPointsForSearch(IRootFolder $root, string $path, bool $limitToHome = false): array {
$rootLength = strlen($path);
$mount = $root->getMount($path);
$storage = $mount->getStorage();