From eee5abf2103eb799e553e15bc88ae816406fd419 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sat, 14 Oct 2023 19:34:30 -0700 Subject: [PATCH] refactor: improve typing Signed-off-by: Varun Patil --- lib/Controller/FoldersController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/Controller/FoldersController.php b/lib/Controller/FoldersController.php index 576dc9db..6d0358f7 100644 --- a/lib/Controller/FoldersController.php +++ b/lib/Controller/FoldersController.php @@ -31,9 +31,14 @@ class FoldersController extends GenericApiController // Ugly: get the view of the folder with reflection // This is unfortunately the only way to get the contents of a folder - // matching a MIME type without using SEARCH, which is deep - $rp = new \ReflectionProperty('\OC\Files\Node\Node', 'view'); + // matching a MIME type without using SEARCH, which is deep. + // + // To top it off, all this is completely useless at the moment + // because the MIME search is done PHP-side + $rp = new \ReflectionProperty(\OC\Files\Node\Node::class, 'view'); $rp->setAccessible(true); + + /** @var \OC\Files\View */ $view = $rp->getValue($node); // Get the subfolders