aboutsummaryrefslogtreecommitdiffstats
path: root/apps/encryption
diff options
context:
space:
mode:
authorprovokateurin <kate@provokateurin.de>2024-09-26 09:22:26 +0200
committerprovokateurin <kate@provokateurin.de>2024-09-26 09:22:26 +0200
commitb9115da4f27ff2cc013da4ec88754c1175dd5216 (patch)
treecffbf11e3742d744f46ef95577d0b05c208e19eb /apps/encryption
parent9a220989dd1cd3a5792b8fc385ee1d7b1bcc7fb8 (diff)
downloadnextcloud-server-refactor/apps/php55-features.tar.gz
nextcloud-server-refactor/apps/php55-features.zip
refactor(apps): Use PHP 5.5 featuresrefactor/apps/php55-features
Signed-off-by: provokateurin <kate@provokateurin.de>
Diffstat (limited to 'apps/encryption')
-rw-r--r--apps/encryption/lib/Command/FixEncryptedVersion.php2
-rw-r--r--apps/encryption/lib/Crypto/Encryption.php2
-rw-r--r--apps/encryption/tests/Command/FixEncryptedVersionTest.php2
-rw-r--r--apps/encryption/tests/Crypto/EncryptionTest.php2
4 files changed, 4 insertions, 4 deletions
diff --git a/apps/encryption/lib/Command/FixEncryptedVersion.php b/apps/encryption/lib/Command/FixEncryptedVersion.php
index 6635bb6cba9..16181f22942 100644
--- a/apps/encryption/lib/Command/FixEncryptedVersion.php
+++ b/apps/encryption/lib/Command/FixEncryptedVersion.php
@@ -242,7 +242,7 @@ class FixEncryptedVersion extends Command {
return true;
}
- if ($storage->instanceOfStorage('OCA\Files_Sharing\ISharedStorage')) {
+ if ($storage->instanceOfStorage(\OCA\Files_Sharing\ISharedStorage::class)) {
$output->writeln("<info>The file: \"$path\" is a share. Please also run the script for the owner of the share</info>");
return true;
}
diff --git a/apps/encryption/lib/Crypto/Encryption.php b/apps/encryption/lib/Crypto/Encryption.php
index f5b6a40aecc..caf88cb2fac 100644
--- a/apps/encryption/lib/Crypto/Encryption.php
+++ b/apps/encryption/lib/Crypto/Encryption.php
@@ -378,7 +378,7 @@ class Encryption implements IEncryptionModule {
public function shouldEncrypt($path) {
if ($this->util->shouldEncryptHomeStorage() === false) {
$storage = $this->util->getStorage($path);
- if ($storage && $storage->instanceOfStorage('\OCP\Files\IHomeStorage')) {
+ if ($storage && $storage->instanceOfStorage(\OCP\Files\IHomeStorage::class)) {
return false;
}
}
diff --git a/apps/encryption/tests/Command/FixEncryptedVersionTest.php b/apps/encryption/tests/Command/FixEncryptedVersionTest.php
index e5079b9a8af..069352e1e2b 100644
--- a/apps/encryption/tests/Command/FixEncryptedVersionTest.php
+++ b/apps/encryption/tests/Command/FixEncryptedVersionTest.php
@@ -52,7 +52,7 @@ class FixEncryptedVersionTest extends TestCase {
$this->createUser($this->userId, 'foo12345678');
$tmpFolder = \OC::$server->getTempManager()->getTemporaryFolder();
- $this->registerMount($this->userId, '\OC\Files\Storage\Local', '/' . $this->userId, ['datadir' => $tmpFolder]);
+ $this->registerMount($this->userId, \OC\Files\Storage\Local::class, '/' . $this->userId, ['datadir' => $tmpFolder]);
$this->setupForUser($this->userId, 'foo12345678');
$this->loginWithEncryption($this->userId);
diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php
index 70c9899cf81..411c5e21334 100644
--- a/apps/encryption/tests/Crypto/EncryptionTest.php
+++ b/apps/encryption/tests/Crypto/EncryptionTest.php
@@ -375,7 +375,7 @@ class EncryptionTest extends TestCase {
if ($shouldEncryptHomeStorage === false) {
$this->storageMock->expects($this->once())->method('instanceOfStorage')
- ->with('\OCP\Files\IHomeStorage')->willReturn($isHomeStorage);
+ ->with(\OCP\Files\IHomeStorage::class)->willReturn($isHomeStorage);
$this->utilMock->expects($this->once())->method('getStorage')->with($path)
->willReturn($this->storageMock);
}