aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Cache
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2023-06-15 23:21:56 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2023-06-21 16:53:20 +0200
commit71e41ffeeb4367f3253f16aba3bf21b80c09ca2b (patch)
treeb8ecaada6f8e675b2670dcfe4389326dfa23568d /lib/private/Files/Cache
parentf6ac874dbf7d4e5cb2255f25464df214bb956ffb (diff)
downloadnextcloud-server-71e41ffeeb4367f3253f16aba3bf21b80c09ca2b.tar.gz
nextcloud-server-71e41ffeeb4367f3253f16aba3bf21b80c09ca2b.zip
refactor: declare getMount() and getMountsIn() at IRootFolder
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib/private/Files/Cache')
-rw-r--r--lib/private/Files/Cache/QuerySearchHelper.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/private/Files/Cache/QuerySearchHelper.php b/lib/private/Files/Cache/QuerySearchHelper.php
index b4376eb2d98..75e203d5fd9 100644
--- a/lib/private/Files/Cache/QuerySearchHelper.php
+++ b/lib/private/Files/Cache/QuerySearchHelper.php
@@ -199,12 +199,8 @@ class QuerySearchHelper {
*/
public function getCachesAndMountPointsForSearch(IRootFolder $root, string $path, bool $limitToHome = false): array {
$rootLength = strlen($path);
- $storage = null;
- if (method_exists($root, 'getMount')) {
- /** @var IMountPoint $mount */
- $mount = $root->getMount($path);
- $storage = $mount->getStorage();
- }
+ $mount = $root->getMount($path);
+ $storage = $mount->getStorage();
if ($storage === null) {
return [];
}
@@ -221,8 +217,7 @@ class QuerySearchHelper {
/** @var IMountPoint[] $mountByMountPoint */
$mountByMountPoint = ['' => $mount];
- if (!$limitToHome && method_exists($root, 'getMountsIn')) {
- /** @var IMountPoint[] $mounts */
+ if (!$limitToHome) {
$mounts = $root->getMountsIn($path);
foreach ($mounts as $mount) {
$storage = $mount->getStorage();