summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-04-03 12:17:47 +0200
committerJulius Härtl <jus@bitgrid.net>2020-04-03 23:06:26 +0200
commit56aa8fd0355879fed339e499b6c679d4cffd0913 (patch)
tree43028f1a7e319f3c386240625510509e1914ebea /lib/private
parentfba7bcfcc42bb2f032f2e4c5559fc57353fd43f8 (diff)
downloadnextcloud-server-56aa8fd0355879fed339e499b6c679d4cffd0913.tar.gz
nextcloud-server-56aa8fd0355879fed339e499b6c679d4cffd0913.zip
Properly hint exceptions thrown by getUserFolder
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Node/Root.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php
index 843069ff50d..13c715816ef 100644
--- a/lib/private/Files/Node/Root.php
+++ b/lib/private/Files/Node/Root.php
@@ -35,6 +35,7 @@ use OC\Cache\CappedMemoryCache;
use OC\Files\Mount\Manager;
use OC\Files\Mount\MountPoint;
use OC\Hooks\PublicEmitter;
+use OC\User\NoUserException;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
@@ -352,7 +353,8 @@ class Root extends Folder implements IRootFolder {
*
* @param string $userId user ID
* @return \OCP\Files\Folder
- * @throws \OC\User\NoUserException
+ * @throws NoUserException
+ * @throws NotPermittedException
*/
public function getUserFolder($userId) {
$userObject = $this->userManager->get($userId);
@@ -367,7 +369,7 @@ class Root extends Folder implements IRootFolder {
'app' => 'files',
]
);
- throw new \OC\User\NoUserException('Backends provided no user object');
+ throw new NoUserException('Backends provided no user object');
}
$userId = $userObject->getUID();