diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-03-28 16:13:19 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-04-04 11:45:22 +0200 |
commit | 0b332ceac24ee93e82e25ee95841ae6fae3b889b (patch) | |
tree | 5c33219f115c05a17cec25e2122ff1cae352e86f /lib/private/DirectEditing/Manager.php | |
parent | 292b903bc283c5a7929e092d8262331606461ef7 (diff) | |
download | nextcloud-server-0b332ceac24ee93e82e25ee95841ae6fae3b889b.tar.gz nextcloud-server-0b332ceac24ee93e82e25ee95841ae6fae3b889b.zip |
fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/DirectEditing/Manager.php')
-rw-r--r-- | lib/private/DirectEditing/Manager.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/private/DirectEditing/Manager.php b/lib/private/DirectEditing/Manager.php index 53e2e170ed1..4db41d85a3e 100644 --- a/lib/private/DirectEditing/Manager.php +++ b/lib/private/DirectEditing/Manager.php @@ -25,8 +25,6 @@ */ namespace OC\DirectEditing; -use \OCP\DirectEditing\IManager; -use \OCP\Files\Folder; use Doctrine\DBAL\FetchMode; use OCP\AppFramework\Http\NotFoundResponse; use OCP\AppFramework\Http\Response; @@ -35,9 +33,11 @@ use OCP\Constants; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\DirectEditing\ACreateFromTemplate; use OCP\DirectEditing\IEditor; +use OCP\DirectEditing\IManager; use OCP\DirectEditing\IToken; use OCP\Encryption\IManager as EncryptionManager; use OCP\Files\File; +use OCP\Files\Folder; use OCP\Files\IRootFolder; use OCP\Files\Node; use OCP\Files\NotFoundException; @@ -153,7 +153,7 @@ class Manager implements IManager { throw new \RuntimeException('No creator found'); } - public function open(string $filePath, string $editorId = null, ?int $fileId = null): string { + public function open(string $filePath, ?string $editorId = null, ?int $fileId = null): string { $userFolder = $this->rootFolder->getUserFolder($this->userId); $file = $userFolder->get($filePath); if ($fileId !== null && $file instanceof Folder) { @@ -279,7 +279,7 @@ class Manager implements IManager { $this->userSession->setUser(null); } - public function createToken($editorId, File $file, string $filePath, IShare $share = null): string { + public function createToken($editorId, File $file, string $filePath, ?IShare $share = null): string { $token = $this->random->generate(64, ISecureRandom::CHAR_HUMAN_READABLE); $query = $this->connection->getQueryBuilder(); $query->insert(self::TABLE_TOKENS) |