From afbd9c4e6ed834e713039f2cff88ba3eec03dadb Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Thu, 9 Apr 2020 13:53:40 +0200 Subject: Unify function spacing to PSR2 recommendation Signed-off-by: Christoph Wurst --- apps/encryption/lib/AppInfo/Application.php | 2 +- apps/encryption/tests/Controller/SettingsControllerTest.php | 2 +- apps/encryption/tests/Controller/StatusControllerTest.php | 2 +- apps/encryption/tests/Crypto/CryptTest.php | 2 +- apps/encryption/tests/Crypto/EncryptAllTest.php | 2 +- apps/encryption/tests/Crypto/EncryptionTest.php | 10 +++++----- apps/encryption/tests/KeyManagerTest.php | 6 +++--- 7 files changed, 13 insertions(+), 13 deletions(-) (limited to 'apps/encryption') diff --git a/apps/encryption/lib/AppInfo/Application.php b/apps/encryption/lib/AppInfo/Application.php index deea0967521..fcd7ef569b9 100644 --- a/apps/encryption/lib/AppInfo/Application.php +++ b/apps/encryption/lib/AppInfo/Application.php @@ -111,7 +111,7 @@ class Application extends \OCP\AppFramework\App { $this->encryptionManager->registerEncryptionModule( Encryption::ID, Encryption::DISPLAY_NAME, - function() use ($container) { + function () use ($container) { return new Encryption( $container->query('Crypt'), diff --git a/apps/encryption/tests/Controller/SettingsControllerTest.php b/apps/encryption/tests/Controller/SettingsControllerTest.php index 4ac26cde64c..160c9794613 100644 --- a/apps/encryption/tests/Controller/SettingsControllerTest.php +++ b/apps/encryption/tests/Controller/SettingsControllerTest.php @@ -86,7 +86,7 @@ class SettingsControllerTest extends TestCase { $this->l10nMock->expects($this->any()) ->method('t') - ->willReturnCallback(function($message) { + ->willReturnCallback(function ($message) { return $message; }); diff --git a/apps/encryption/tests/Controller/StatusControllerTest.php b/apps/encryption/tests/Controller/StatusControllerTest.php index 1f5f02a2920..fe2616f9c54 100644 --- a/apps/encryption/tests/Controller/StatusControllerTest.php +++ b/apps/encryption/tests/Controller/StatusControllerTest.php @@ -63,7 +63,7 @@ class StatusControllerTest extends TestCase { ->disableOriginalConstructor()->getMock(); $this->l10nMock->expects($this->any()) ->method('t') - ->willReturnCallback(function($message) { + ->willReturnCallback(function ($message) { return $message; }); $this->encryptionManagerMock = $this->createMock(IManager::class); diff --git a/apps/encryption/tests/Crypto/CryptTest.php b/apps/encryption/tests/Crypto/CryptTest.php index d222d94c16c..dd892616d0f 100644 --- a/apps/encryption/tests/Crypto/CryptTest.php +++ b/apps/encryption/tests/Crypto/CryptTest.php @@ -294,7 +294,7 @@ class CryptTest extends TestCase { * * @return array */ - public function dataProviderRemovePadding() { + public function dataProviderRemovePadding() { return [ ['dataxx', 'data'], ['data', false] diff --git a/apps/encryption/tests/Crypto/EncryptAllTest.php b/apps/encryption/tests/Crypto/EncryptAllTest.php index 7f67f701b50..f5fd3d2287f 100644 --- a/apps/encryption/tests/Crypto/EncryptAllTest.php +++ b/apps/encryption/tests/Crypto/EncryptAllTest.php @@ -322,7 +322,7 @@ class EncryptAllTest extends TestCase { $this->view->expects($this->any())->method('is_dir') ->willReturnCallback( - function($path) { + function ($path) { if ($path === '/user1/files/foo') { return true; } diff --git a/apps/encryption/tests/Crypto/EncryptionTest.php b/apps/encryption/tests/Crypto/EncryptionTest.php index 26e32c3a182..1e4cfad5e30 100644 --- a/apps/encryption/tests/Crypto/EncryptionTest.php +++ b/apps/encryption/tests/Crypto/EncryptionTest.php @@ -323,7 +323,7 @@ class EncryptionTest extends TestCase { $this->keyManagerMock->expects($this->any()) ->method('addSystemKeys') - ->willReturnCallback(function($accessList, $publicKeys) { + ->willReturnCallback(function ($accessList, $publicKeys) { return $publicKeys; }); @@ -350,7 +350,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) { $this->assertSame('path', $path); $this->assertSame(2, $version); $this->assertTrue($view instanceof \OC\Files\View); @@ -368,20 +368,20 @@ class EncryptionTest extends TestCase { $this->keyManagerMock->expects($this->any()) ->method('getPublicKey')->willReturnCallback( - function($user) { + function ($user) { throw new PublicKeyMissingException($user); } ); $this->keyManagerMock->expects($this->any()) ->method('addSystemKeys') - ->willReturnCallback(function($accessList, $publicKeys) { + ->willReturnCallback(function ($accessList, $publicKeys) { return $publicKeys; }); $this->cryptMock->expects($this->once())->method('multiKeyEncrypt') ->willReturnCallback( - function($fileKey, $publicKeys) { + function ($fileKey, $publicKeys) { $this->assertEmpty($publicKeys); $this->assertSame('fileKey', $fileKey); } diff --git a/apps/encryption/tests/KeyManagerTest.php b/apps/encryption/tests/KeyManagerTest.php index 69f238d5ef7..2e2fce2b349 100644 --- a/apps/encryption/tests/KeyManagerTest.php +++ b/apps/encryption/tests/KeyManagerTest.php @@ -242,7 +242,7 @@ class KeyManagerTest extends TestCase { $this->keyStorageMock->expects($this->exactly(2)) ->method('getUserKey') - ->willReturnCallback(function ($uid, $keyID, $encryptionModuleId){ + ->willReturnCallback(function ($uid, $keyID, $encryptionModuleId) { if ($keyID === 'publicKey') { return ''; } @@ -473,13 +473,13 @@ class KeyManagerTest extends TestCase { $this->keyStorageMock->expects($this->any()) ->method('getSystemUserKey') - ->willReturnCallback(function($keyId, $encryptionModuleId) { + ->willReturnCallback(function ($keyId, $encryptionModuleId) { return $keyId; }); $this->utilMock->expects($this->any()) ->method('isRecoveryEnabledForUser') - ->willReturnCallback(function($uid) { + ->willReturnCallback(function ($uid) { if ($uid === 'user1') { return true; } -- cgit v1.2.3