diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-10-10 12:40:31 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-10-15 10:40:25 +0200 |
commit | 1580c8612b01bfa780d1a7372080a27d182fb7dd (patch) | |
tree | b2776d0cd254ac9d6e54828978ce18b702f550d5 /apps/encryption | |
parent | 4ff9b3e0ce53227e2be47c4c2dcb1fdc3e540b5f (diff) | |
download | nextcloud-server-1580c8612b01bfa780d1a7372080a27d182fb7dd.tar.gz nextcloud-server-1580c8612b01bfa780d1a7372080a27d182fb7dd.zip |
chore(apps): Apply new rector configuration to autouse classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/lib/Crypto/DecryptAll.php | 3 | ||||
-rw-r--r-- | apps/encryption/lib/Crypto/Encryption.php | 3 | ||||
-rw-r--r-- | apps/encryption/lib/Hooks/UserHooks.php | 2 | ||||
-rw-r--r-- | apps/encryption/lib/Session.php | 2 | ||||
-rw-r--r-- | apps/encryption/tests/Controller/RecoveryControllerTest.php | 2 | ||||
-rw-r--r-- | apps/encryption/tests/Controller/SettingsControllerTest.php | 8 | ||||
-rw-r--r-- | apps/encryption/tests/Controller/StatusControllerTest.php | 2 | ||||
-rw-r--r-- | apps/encryption/tests/Crypto/CryptTest.php | 5 | ||||
-rw-r--r-- | apps/encryption/tests/Crypto/EncryptAllTest.php | 6 | ||||
-rw-r--r-- | apps/encryption/tests/Crypto/EncryptionTest.php | 20 | ||||
-rw-r--r-- | apps/encryption/tests/HookManagerTest.php | 2 | ||||
-rw-r--r-- | apps/encryption/tests/Hooks/UserHooksTest.php | 2 | ||||
-rw-r--r-- | apps/encryption/tests/KeyManagerTest.php | 23 | ||||
-rw-r--r-- | apps/encryption/tests/RecoveryTest.php | 4 | ||||
-rw-r--r-- | apps/encryption/tests/SessionTest.php | 7 | ||||
-rw-r--r-- | apps/encryption/tests/Users/SetupTest.php | 4 | ||||
-rw-r--r-- | apps/encryption/tests/UtilTest.php | 2 |
17 files changed, 53 insertions, 44 deletions
diff --git a/apps/encryption/lib/Crypto/DecryptAll.php b/apps/encryption/lib/Crypto/DecryptAll.php index 6aa3ee9ac07..c336f2d92a2 100644 --- a/apps/encryption/lib/Crypto/DecryptAll.php +++ b/apps/encryption/lib/Crypto/DecryptAll.php @@ -7,6 +7,7 @@ */ namespace OCA\Encryption\Crypto; +use OCA\Encryption\Exceptions\PrivateKeyMissingException; use OCA\Encryption\KeyManager; use OCA\Encryption\Session; use OCA\Encryption\Util; @@ -118,7 +119,7 @@ class DecryptAll { * @param string $user * @param string $password * @return bool|string - * @throws \OCA\Encryption\Exceptions\PrivateKeyMissingException + * @throws PrivateKeyMissingException */ protected function getPrivateKey($user, $password) { $recoveryKeyId = $this->keyManager->getRecoveryKeyId(); diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php index 5261fea1e19..68bc7df808d 100644 --- a/apps/encryption/lib/Crypto/Encryption.php +++ b/apps/encryption/lib/Crypto/Encryption.php @@ -10,6 +10,7 @@ namespace OCA\Encryption\Crypto; use OC\Encryption\Exceptions\DecryptionFailedException; use OC\Files\Cache\Scanner; use OC\Files\View; +use OCA\Encryption\Exceptions\MultiKeyEncryptException; use OCA\Encryption\Exceptions\PublicKeyMissingException; use OCA\Encryption\KeyManager; use OCA\Encryption\Session; @@ -187,7 +188,7 @@ class Encryption implements IEncryptionModule { * of a write operation * @throws PublicKeyMissingException * @throws \Exception - * @throws \OCA\Encryption\Exceptions\MultiKeyEncryptException + * @throws MultiKeyEncryptException */ public function end($path, $position = '0') { $result = ''; diff --git a/apps/encryption/lib/Hooks/UserHooks.php b/apps/encryption/lib/Hooks/UserHooks.php index a17686489d4..e75a1e545d1 100644 --- a/apps/encryption/lib/Hooks/UserHooks.php +++ b/apps/encryption/lib/Hooks/UserHooks.php @@ -94,7 +94,7 @@ class UserHooks implements IHook { */ public function login($params) { // ensure filesystem is loaded - if (!\OC\Files\Filesystem::$loaded) { + if (!Filesystem::$loaded) { $this->setupFS($params['uid']); } if ($this->util->isMasterKeyEnabled() === false) { diff --git a/apps/encryption/lib/Session.php b/apps/encryption/lib/Session.php index e16396e8faf..4b759618eb2 100644 --- a/apps/encryption/lib/Session.php +++ b/apps/encryption/lib/Session.php @@ -68,7 +68,7 @@ class Session { public function getPrivateKey() { $key = $this->session->get('privateKey'); if (is_null($key)) { - throw new Exceptions\PrivateKeyMissingException('please try to log-out and log-in again', 0); + throw new PrivateKeyMissingException('please try to log-out and log-in again', 0); } return $key; } diff --git a/apps/encryption/tests/Controller/RecoveryControllerTest.php b/apps/encryption/tests/Controller/RecoveryControllerTest.php index 8398a22039b..57015975cfc 100644 --- a/apps/encryption/tests/Controller/RecoveryControllerTest.php +++ b/apps/encryption/tests/Controller/RecoveryControllerTest.php @@ -24,7 +24,7 @@ class RecoveryControllerTest extends TestCase { private $configMock; /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10nMock; - /** @var \OCA\Encryption\Recovery|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Recovery|\PHPUnit\Framework\MockObject\MockObject */ private $recoveryMock; public function adminRecoveryProvider() { diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php index dcad23cd759..830536dc835 100644 --- a/apps/encryption/tests/Controller/SettingsControllerTest.php +++ b/apps/encryption/tests/Controller/SettingsControllerTest.php @@ -39,13 +39,13 @@ class SettingsControllerTest extends TestCase { /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userSessionMock; - /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; - /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; - /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Session|\PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; /** @var MockObject|IUser */ private $user; @@ -53,7 +53,7 @@ class SettingsControllerTest extends TestCase { /** @var \OCP\ISession|\PHPUnit\Framework\MockObject\MockObject */ private $ocSessionMock; - /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Util|\PHPUnit\Framework\MockObject\MockObject */ private $utilMock; protected function setUp(): void { diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php index c88b0497abf..e52aaba30c1 100644 --- a/apps/encryption/tests/Controller/StatusControllerTest.php +++ b/apps/encryption/tests/Controller/StatusControllerTest.php @@ -22,7 +22,7 @@ class StatusControllerTest extends TestCase { /** @var \OCP\IL10N|\PHPUnit\Framework\MockObject\MockObject */ private $l10nMock; - /** @var \OCA\Encryption\Session | \PHPUnit\Framework\MockObject\MockObject */ + /** @var Session|\PHPUnit\Framework\MockObject\MockObject */ protected $sessionMock; /** @var IManager | \PHPUnit\Framework\MockObject\MockObject */ diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php index 9b6c8227083..ba0227ec56a 100644 --- a/apps/encryption/tests/Crypto/CryptTest.php +++ b/apps/encryption/tests/Crypto/CryptTest.php @@ -8,6 +8,7 @@ namespace OCA\Encryption\Tests\Crypto; use OCA\Encryption\Crypto\Crypt; +use OCP\Encryption\Exceptions\GenericEncryptionException; use OCP\IConfig; use OCP\IL10N; use OCP\IUserSession; @@ -232,7 +233,7 @@ class CryptTest extends TestCase { * @dataProvider dataTestHasSignatureFail */ public function testHasSignatureFail($cipher): void { - $this->expectException(\OCP\Encryption\Exceptions\GenericEncryptionException::class); + $this->expectException(GenericEncryptionException::class); $data = 'encryptedContent00iv001234567890123456xx'; $this->invokePrivate($this->crypt, 'hasSignature', [$data, $cipher]); @@ -377,7 +378,7 @@ class CryptTest extends TestCase { ['encryption.use_legacy_base64_encoding', false]) ->willReturnOnConsecutiveCalls(true, false); - /** @var \OCA\Encryption\Crypto\Crypt | \PHPUnit\Framework\MockObject\MockObject $crypt */ + /** @var Crypt|\PHPUnit\Framework\MockObject\MockObject $crypt */ $crypt = $this->getMockBuilder(Crypt::class) ->setConstructorArgs( [ diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php index f58ea2119e6..9de4f6c2c67 100644 --- a/apps/encryption/tests/Crypto/EncryptAllTest.php +++ b/apps/encryption/tests/Crypto/EncryptAllTest.php @@ -29,16 +29,16 @@ use Test\TestCase; class EncryptAllTest extends TestCase { - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\KeyManager */ + /** @var \PHPUnit\Framework\MockObject\MockObject|KeyManager */ protected $keyManager; - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\Util */ + /** @var \PHPUnit\Framework\MockObject\MockObject|Util */ protected $util; /** @var \PHPUnit\Framework\MockObject\MockObject | \OCP\IUserManager */ protected $userManager; - /** @var \PHPUnit\Framework\MockObject\MockObject | \OCA\Encryption\Users\Setup */ + /** @var \PHPUnit\Framework\MockObject\MockObject|Setup */ protected $setupUser; /** @var \PHPUnit\Framework\MockObject\MockObject | \OC\Files\View */ diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 70c9899cf81..2390012a97a 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -7,6 +7,8 @@ */ namespace OCA\Encryption\Tests\Crypto; +use OC\Encryption\Exceptions\DecryptionFailedException; +use OC\Files\View; use OCA\Encryption\Crypto\Crypt; use OCA\Encryption\Crypto\DecryptAll; use OCA\Encryption\Crypto\EncryptAll; @@ -27,22 +29,22 @@ class EncryptionTest extends TestCase { /** @var Encryption */ private $instance; - /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject */ + /** @var KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; - /** @var \OCA\Encryption\Crypto\EncryptAll|\PHPUnit\Framework\MockObject\MockObject */ + /** @var EncryptAll|\PHPUnit\Framework\MockObject\MockObject */ private $encryptAllMock; - /** @var \OCA\Encryption\Crypto\DecryptAll|\PHPUnit\Framework\MockObject\MockObject */ + /** @var DecryptAll|\PHPUnit\Framework\MockObject\MockObject */ private $decryptAllMock; - /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Session|\PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; - /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; - /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Util|\PHPUnit\Framework\MockObject\MockObject */ private $utilMock; /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ @@ -120,7 +122,7 @@ class EncryptionTest extends TestCase { ->method('decryptAllModeActivated') ->willReturn(false); - $this->expectException(\OCA\Encryption\Exceptions\PublicKeyMissingException::class); + $this->expectException(PublicKeyMissingException::class); $this->instance->begin('/foo/bar', 'user2', 'r', [], ['users' => ['user1', 'user2', 'user3']]); $this->endTest(); @@ -320,7 +322,7 @@ class EncryptionTest extends TestCase { ->willReturnCallback(function ($path, $version, $view): void { $this->assertSame('path', $path); $this->assertSame(2, $version); - $this->assertTrue($view instanceof \OC\Files\View); + $this->assertTrue($view instanceof View); }); $this->instance->update('path', 'user1', []); } @@ -403,7 +405,7 @@ class EncryptionTest extends TestCase { public function testDecrypt(): void { - $this->expectException(\OC\Encryption\Exceptions\DecryptionFailedException::class); + $this->expectException(DecryptionFailedException::class); $this->expectExceptionMessage('Cannot decrypt this file, probably this is a shared file. Please ask the file owner to reshare the file with you.'); $this->instance->decrypt('abc'); diff --git a/apps/encryption/tests/HookManagerTest.php b/apps/encryption/tests/HookManagerTest.php index ad1fac3407f..f831690580f 100644 --- a/apps/encryption/tests/HookManagerTest.php +++ b/apps/encryption/tests/HookManagerTest.php @@ -43,7 +43,7 @@ class HookManagerTest extends TestCase { public function testRegisterHooksWithInstance(): void { $mock = $this->getMockBuilder(IHook::class)->disableOriginalConstructor()->getMock(); - /** @var \OCA\Encryption\Hooks\Contracts\IHook $mock */ + /** @var IHook $mock */ self::$instance->registerHook($mock); $hookInstances = self::invokePrivate(self::$instance, 'hookInstances'); diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php index f59a2fd8d01..072a20de846 100644 --- a/apps/encryption/tests/Hooks/UserHooksTest.php +++ b/apps/encryption/tests/Hooks/UserHooksTest.php @@ -305,7 +305,7 @@ class UserHooksTest extends TestCase { ] )->setMethods(['initMountPoints'])->getMock(); - /** @var \OCA\Encryption\Hooks\UserHooks $userHooks */ + /** @var UserHooks $userHooks */ $this->assertNull($userHooks->setPassphrase($this->params)); } diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index 869e5e2cf96..54c1bc2295a 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -10,6 +10,9 @@ namespace OCA\Encryption\Tests; use OC\Files\FileInfo; use OC\Files\View; use OCA\Encryption\Crypto\Crypt; +use OCA\Encryption\Crypto\Encryption; +use OCA\Encryption\Exceptions\PrivateKeyMissingException; +use OCA\Encryption\Exceptions\PublicKeyMissingException; use OCA\Encryption\KeyManager; use OCA\Encryption\Session; use OCA\Encryption\Util; @@ -40,19 +43,19 @@ class KeyManagerTest extends TestCase { /** @var \OCP\Encryption\Keys\IStorage|\PHPUnit\Framework\MockObject\MockObject */ private $keyStorageMock; - /** @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; /** @var \OCP\IUserSession|\PHPUnit\Framework\MockObject\MockObject */ private $userMock; - /** @var \OCA\Encryption\Session|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Session|\PHPUnit\Framework\MockObject\MockObject */ private $sessionMock; /** @var LoggerInterface|\PHPUnit\Framework\MockObject\MockObject */ private $logMock; - /** @var \OCA\Encryption\Util|\PHPUnit\Framework\MockObject\MockObject */ + /** @var Util|\PHPUnit\Framework\MockObject\MockObject */ private $utilMock; /** @var \OCP\IConfig|\PHPUnit\Framework\MockObject\MockObject */ @@ -207,7 +210,7 @@ class KeyManagerTest extends TestCase { public function testUserHasKeysMissingPrivateKey(): void { - $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); + $this->expectException(PrivateKeyMissingException::class); $this->keyStorageMock->expects($this->exactly(2)) ->method('getUserKey') @@ -223,7 +226,7 @@ class KeyManagerTest extends TestCase { public function testUserHasKeysMissingPublicKey(): void { - $this->expectException(\OCA\Encryption\Exceptions\PublicKeyMissingException::class); + $this->expectException(PublicKeyMissingException::class); $this->keyStorageMock->expects($this->exactly(2)) ->method('getUserKey') @@ -243,7 +246,7 @@ class KeyManagerTest extends TestCase { * @param bool $useMasterKey */ public function testInit($useMasterKey): void { - /** @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject $instance */ + /** @var KeyManager|\PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( [ @@ -527,7 +530,7 @@ class KeyManagerTest extends TestCase { public function testGetPublicMasterKey(): void { $this->keyStorageMock->expects($this->once())->method('getSystemUserKey') - ->with('systemKeyId.publicKey', \OCA\Encryption\Crypto\Encryption::ID) + ->with('systemKeyId.publicKey', Encryption::ID) ->willReturn(true); $this->assertTrue( @@ -560,7 +563,7 @@ class KeyManagerTest extends TestCase { * @param $masterKey */ public function testValidateMasterKey($masterKey): void { - /** @var \OCA\Encryption\KeyManager | \PHPUnit\Framework\MockObject\MockObject $instance */ + /** @var KeyManager|\PHPUnit\Framework\MockObject\MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( [ @@ -589,7 +592,7 @@ class KeyManagerTest extends TestCase { $this->cryptMock->expects($this->once())->method('createKeyPair') ->willReturn(['publicKey' => 'public', 'privateKey' => 'private']); $this->keyStorageMock->expects($this->once())->method('setSystemUserKey') - ->with('systemKeyId.publicKey', 'public', \OCA\Encryption\Crypto\Encryption::ID); + ->with('systemKeyId.publicKey', 'public', Encryption::ID); $this->cryptMock->expects($this->once())->method('encryptPrivateKey') ->with('private', 'masterKeyPassword', 'systemKeyId') ->willReturn('EncryptedKey'); @@ -608,7 +611,7 @@ class KeyManagerTest extends TestCase { } public function testValidateMasterKeyLocked(): void { - /** @var \OCA\Encryption\KeyManager | \PHPUnit_Framework_MockObject_MockObject $instance */ + /** @var KeyManager|\PHPUnit_Framework_MockObject_MockObject $instance */ $instance = $this->getMockBuilder(KeyManager::class) ->setConstructorArgs( [ diff --git a/apps/encryption/tests/RecoveryTest.php b/apps/encryption/tests/RecoveryTest.php index 4b28d408844..725e16342e7 100644 --- a/apps/encryption/tests/RecoveryTest.php +++ b/apps/encryption/tests/RecoveryTest.php @@ -37,7 +37,7 @@ class RecoveryTest extends TestCase { */ private $user; /** - * @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject + * @var KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; /** @@ -45,7 +45,7 @@ class RecoveryTest extends TestCase { */ private $configMock; /** - * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject + * @var Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; /** diff --git a/apps/encryption/tests/SessionTest.php b/apps/encryption/tests/SessionTest.php index 10c699898fc..c9486658bcb 100644 --- a/apps/encryption/tests/SessionTest.php +++ b/apps/encryption/tests/SessionTest.php @@ -7,6 +7,7 @@ */ namespace OCA\Encryption\Tests; +use OCA\Encryption\Exceptions\PrivateKeyMissingException; use OCA\Encryption\Session; use OCP\ISession; use Test\TestCase; @@ -22,7 +23,7 @@ class SessionTest extends TestCase { public function testThatGetPrivateKeyThrowsExceptionWhenNotSet(): void { - $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); + $this->expectException(PrivateKeyMissingException::class); $this->expectExceptionMessage('Private Key missing for user: please try to log-out and log-in again'); $this->instance->getPrivateKey(); @@ -84,7 +85,7 @@ class SessionTest extends TestCase { * @expectExceptionMessage 'Please activate decrypt all mode first' */ public function testGetDecryptAllKeyException(): void { - $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); + $this->expectException(PrivateKeyMissingException::class); $this->instance->getDecryptAllKey(); } @@ -93,7 +94,7 @@ class SessionTest extends TestCase { * @expectExceptionMessage 'No key found while in decrypt all mode' */ public function testGetDecryptAllKeyException2(): void { - $this->expectException(\OCA\Encryption\Exceptions\PrivateKeyMissingException::class); + $this->expectException(PrivateKeyMissingException::class); $this->instance->prepareDecryptAll('user', null); $this->instance->getDecryptAllKey(); diff --git a/apps/encryption/tests/Users/SetupTest.php b/apps/encryption/tests/Users/SetupTest.php index 92f24a0627c..7a6beaf3594 100644 --- a/apps/encryption/tests/Users/SetupTest.php +++ b/apps/encryption/tests/Users/SetupTest.php @@ -14,11 +14,11 @@ use Test\TestCase; class SetupTest extends TestCase { /** - * @var \OCA\Encryption\KeyManager|\PHPUnit\Framework\MockObject\MockObject + * @var KeyManager|\PHPUnit\Framework\MockObject\MockObject */ private $keyManagerMock; /** - * @var \OCA\Encryption\Crypto\Crypt|\PHPUnit\Framework\MockObject\MockObject + * @var Crypt|\PHPUnit\Framework\MockObject\MockObject */ private $cryptMock; /** diff --git a/apps/encryption/tests/UtilTest.php b/apps/encryption/tests/UtilTest.php index f2e6f406c35..5571a9483db 100644 --- a/apps/encryption/tests/UtilTest.php +++ b/apps/encryption/tests/UtilTest.php @@ -64,7 +64,7 @@ class UtilTest extends TestCase { $this->filesMock = $this->createMock(View::class); $this->userManagerMock = $this->createMock(IUserManager::class); - /** @var \OCA\Encryption\Crypto\Crypt $cryptMock */ + /** @var Crypt $cryptMock */ $cryptMock = $this->getMockBuilder(Crypt::class) ->disableOriginalConstructor() ->getMock(); |