refactor: improve typing

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/877/head
Varun Patil 2023-10-14 19:34:30 -07:00
parent 465c5f2597
commit eee5abf210
1 changed files with 7 additions and 2 deletions

View File

@ -31,9 +31,14 @@ class FoldersController extends GenericApiController
// Ugly: get the view of the folder with reflection // Ugly: get the view of the folder with reflection
// This is unfortunately the only way to get the contents of a folder // This is unfortunately the only way to get the contents of a folder
// matching a MIME type without using SEARCH, which is deep // matching a MIME type without using SEARCH, which is deep.
$rp = new \ReflectionProperty('\OC\Files\Node\Node', 'view'); //
// 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); $rp->setAccessible(true);
/** @var \OC\Files\View */
$view = $rp->getValue($node); $view = $rp->getValue($node);
// Get the subfolders // Get the subfolders