diff options
author | Thomas Citharel <tcit@tcit.fr> | 2023-10-19 15:31:44 +0200 |
---|---|---|
committer | Thomas Citharel <tcit@tcit.fr> | 2024-02-02 14:59:20 +0100 |
commit | 4c618c4bf14bce6120acd1d05d29772a7746784a (patch) | |
tree | 3251806a05cd8849fe3a97c9a43acfb7da6071e7 /lib | |
parent | 05dda07481a3cb7b706c76b250c3ef0ef19c73bf (diff) | |
download | nextcloud-server-4c618c4bf14bce6120acd1d05d29772a7746784a.tar.gz nextcloud-server-4c618c4bf14bce6120acd1d05d29772a7746784a.zip |
fix(objectstorage): cleanup HomeObjectStoreStorage
Fix invalid signature for getUser() method and change occurences of OC\User\User for OCP\IUser
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/ObjectStore/HomeObjectStoreStorage.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php index b361249ff47..b2d0bc3d478 100644 --- a/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/HomeObjectStoreStorage.php @@ -25,16 +25,16 @@ */ namespace OC\Files\ObjectStore; -use OC\User\User; +use OCP\Files\IHomeStorage; use OCP\IUser; -class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IHomeStorage { +class HomeObjectStoreStorage extends ObjectStoreStorage implements IHomeStorage { /** * The home user storage requires a user object to create a unique storage id * @param array $params */ public function __construct($params) { - if (! isset($params['user']) || ! $params['user'] instanceof User) { + if (! isset($params['user']) || ! $params['user'] instanceof IUser) { throw new \Exception('missing user object in parameters'); } $this->user = $params['user']; @@ -58,11 +58,7 @@ class HomeObjectStoreStorage extends ObjectStoreStorage implements \OCP\Files\IH return false; } - /** - * @param string $path, optional - * @return \OC\User\User - */ - public function getUser($path = null): IUser { + public function getUser(): IUser { return $this->user; } } |