mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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>
This commit is contained in:
parent
05dda07481
commit
4c618c4bf1
1 changed files with 4 additions and 8 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue