Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor OC\Server::getEncryptionKeyStorage #40133

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/private/Encryption/EncryptionWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use OC\Files\Storage\Wrapper\Encryption;
use OC\Files\View;
use OC\Memcache\ArrayCache;
use OCP\Encryption\Keys\IStorage;
skjnldsv marked this conversation as resolved.
Show resolved Hide resolved
use OCP\Files\Mount\IMountPoint;
use OCP\Files\Storage\IDisableEncryptionStorage;
use OCP\Files\Storage\IStorage;
Expand Down Expand Up @@ -65,7 +66,7 @@
* Wraps the given storage when it is not a shared storage
*
* @param string $mountPoint
* @param IStorage $storage

Check failure on line 69 in lib/private/Encryption/EncryptionWrapper.php

View workflow job for this annotation

GitHub Actions / static-code-analysis

MismatchingDocblockParamType

lib/private/Encryption/EncryptionWrapper.php:69:12: MismatchingDocblockParamType: Parameter $storage has wrong type 'OCP\Files\Storage\IStorage', should be 'OCP\Encryption\Keys\IStorage' (see https://psalm.dev/141)
* @param IMountPoint $mount
* @param bool $force apply the wrapper even if the storage normally has encryption disabled, helpful for repair steps
* @return Encryption|IStorage
Expand All @@ -82,7 +83,7 @@
$mountManager = Filesystem::getMountManager();
$uid = $user ? $user->getUID() : null;
$fileHelper = \OC::$server->getEncryptionFilesHelper();
$keyStorage = \OC::$server->getEncryptionKeyStorage();
$keyStorage = \OC::$server->get(IStorage::class);
skjnldsv marked this conversation as resolved.
Show resolved Hide resolved

$util = new Util(
new View(),
Expand Down
Loading