From 1a4978c4ead55daa2726df5967c1377d61a57f7a Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Fri, 20 Sep 2024 17:38:36 +0200 Subject: chore: Apply rector configuration to apps folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/encryption/lib/AppInfo/Application.php | 2 +- apps/encryption/tests/Crypto/EncryptionTest.php | 4 ++-- apps/encryption/tests/Hooks/UserHooksTest.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/encryption') diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php index d3f7eb44145..d683c82286a 100644 --- a/apps/encryption/lib/AppInfo/Application.php +++ b/apps/encryption/lib/AppInfo/Application.php @@ -39,7 +39,7 @@ class Application extends App implements IBootstrap { public function boot(IBootContext $context): void { \OCP\Util::addScript(self::APP_ID, 'encryption'); - $context->injectFn(function (IManager $encryptionManager) use ($context) { + $context->injectFn(function (IManager $encryptionManager) use ($context): void { if (!($encryptionManager instanceof \OC\Encryption\Manager)) { return; } diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 10f85f7e74e..70c9899cf81 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -317,7 +317,7 @@ class EncryptionTest extends TestCase { $this->keyManagerMock->expects($this->never())->method('getPublicKey'); $this->keyManagerMock->expects($this->never())->method('addSystemKeys'); $this->keyManagerMock->expects($this->once())->method('setVersion') - ->willReturnCallback(function ($path, $version, $view) { + ->willReturnCallback(function ($path, $version, $view): void { $this->assertSame('path', $path); $this->assertSame(2, $version); $this->assertTrue($view instanceof \OC\Files\View); @@ -335,7 +335,7 @@ class EncryptionTest extends TestCase { $this->keyManagerMock->expects($this->any()) ->method('getPublicKey')->willReturnCallback( - function ($user) { + function ($user): void { throw new PublicKeyMissingException($user); } ); diff --git a/apps/encryption/tests/Hooks/UserHooksTest.php b/apps/encryption/tests/Hooks/UserHooksTest.php index 3bb0b559fdf..f59a2fd8d01 100644 --- a/apps/encryption/tests/Hooks/UserHooksTest.php +++ b/apps/encryption/tests/Hooks/UserHooksTest.php @@ -204,7 +204,7 @@ class UserHooksTest extends TestCase { $this->keyManagerMock->expects($this->exactly(4)) ->method('setPrivateKey') - ->willReturnCallback(function ($user, $key) { + ->willReturnCallback(function ($user, $key): void { $header = substr($key, 0, strlen(Crypt::HEADER_START)); $this->assertSame( Crypt::HEADER_START, -- cgit v1.2.3