aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Encryption
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:53:40 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 13:54:22 +0200
commitafbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch)
tree7d8721cf8fc0329d6b750db63798de67a162b090 /tests/lib/Encryption
parent19e97e86c69ab128191439d6a17dacb5a630cf98 (diff)
downloadnextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.tar.gz
nextcloud-server-afbd9c4e6ed834e713039f2cff88ba3eec03dadb.zip
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Encryption')
-rw-r--r--tests/lib/Encryption/DecryptAllTest.php6
-rw-r--r--tests/lib/Encryption/Keys/StorageTest.php4
-rw-r--r--tests/lib/Encryption/ManagerTest.php10
-rw-r--r--tests/lib/Encryption/UpdateTest.php2
4 files changed, 11 insertions, 11 deletions
diff --git a/tests/lib/Encryption/DecryptAllTest.php b/tests/lib/Encryption/DecryptAllTest.php
index 2c8cc2a4ac9..8e53c4a92e1 100644
--- a/tests/lib/Encryption/DecryptAllTest.php
+++ b/tests/lib/Encryption/DecryptAllTest.php
@@ -177,7 +177,7 @@ class DecryptAllTest extends TestCase {
->with($this->inputInterface, $this->outputInterface, $user)
->willReturn($success);
- $callback = function() use ($dummyEncryptionModule) {return $dummyEncryptionModule;};
+ $callback = function () use ($dummyEncryptionModule) {return $dummyEncryptionModule;};
$moduleDescription = [
'id' => 'id',
'displayName' => 'displayName',
@@ -283,7 +283,7 @@ class DecryptAllTest extends TestCase {
$this->view->expects($this->any())->method('is_dir')
->willReturnCallback(
- function($path) {
+ function ($path) {
if ($path === '/user1/files/foo') {
return true;
}
@@ -379,7 +379,7 @@ class DecryptAllTest extends TestCase {
$this->view->expects($this->once())
->method('copy')
->with($path, $path . '.decrypted.42')
- ->willReturnCallback(function() { throw new DecryptionFailedException();});
+ ->willReturnCallback(function () { throw new DecryptionFailedException();});
$this->view->expects($this->never())->method('rename');
$this->view->expects($this->once())
diff --git a/tests/lib/Encryption/Keys/StorageTest.php b/tests/lib/Encryption/Keys/StorageTest.php
index 7e21fe881fc..2233c25c8f1 100644
--- a/tests/lib/Encryption/Keys/StorageTest.php
+++ b/tests/lib/Encryption/Keys/StorageTest.php
@@ -338,7 +338,7 @@ class StorageTest extends TestCase {
->willReturnCallback([$this, 'getUidAndFilenameCallback']);
$this->util->expects($this->any())
->method('isSystemWideMountPoint')
- ->willReturnCallback(function($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) {
+ ->willReturnCallback(function ($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) {
if(strpos($path, 'source.txt') !== false) {
return $systemWideMountSource;
}
@@ -369,7 +369,7 @@ class StorageTest extends TestCase {
->willReturnCallback([$this, 'getUidAndFilenameCallback']);
$this->util->expects($this->any())
->method('isSystemWideMountPoint')
- ->willReturnCallback(function($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) {
+ ->willReturnCallback(function ($path, $owner) use ($systemWideMountSource, $systemWideMountTarget) {
if(strpos($path, 'source.txt') !== false) {
return $systemWideMountSource;
}
diff --git a/tests/lib/Encryption/ManagerTest.php b/tests/lib/Encryption/ManagerTest.php
index 6e18cd296a3..5a34e9cb392 100644
--- a/tests/lib/Encryption/ManagerTest.php
+++ b/tests/lib/Encryption/ManagerTest.php
@@ -60,7 +60,7 @@ class ManagerTest extends TestCase {
$em = $this->createMock(IEncryptionModule::class);
$em->expects($this->any())->method('getId')->willReturn('id');
$em->expects($this->any())->method('getDisplayName')->willReturn('TestDummyModule0');
- $this->manager->registerEncryptionModule('id', 'TestDummyModule0', function() use ($em) {return $em;});
+ $this->manager->registerEncryptionModule('id', 'TestDummyModule0', function () use ($em) {return $em;});
$this->assertFalse($this->manager->isEnabled());
}
@@ -117,7 +117,7 @@ class ManagerTest extends TestCase {
$this->config->expects($this->any())
->method('getAppValue')
->with('core', 'default_encryption_module')
- ->willReturnCallback(function() { global $defaultId; return $defaultId; });
+ ->willReturnCallback(function () { global $defaultId; return $defaultId; });
$this->addNewEncryptionModule($this->manager, 0);
$this->assertCount(1, $this->manager->getEncryptionModules());
@@ -138,7 +138,7 @@ class ManagerTest extends TestCase {
$this->config->expects($this->any())
->method('getAppValue')
->with('core', 'default_encryption_module')
- ->willReturnCallback(function() { global $defaultId; return $defaultId; });
+ ->willReturnCallback(function () { global $defaultId; return $defaultId; });
$this->addNewEncryptionModule($this->manager, 0);
$defaultId = 'ID0';
@@ -160,7 +160,7 @@ class ManagerTest extends TestCase {
$this->config->expects($this->any())
->method('getAppValue')
->with('core', 'default_encryption_module')
- ->willReturnCallback(function() { global $defaultId; return $defaultId; });
+ ->willReturnCallback(function () { global $defaultId; return $defaultId; });
$this->addNewEncryptionModule($this->manager, 0);
$this->assertCount(1, $this->manager->getEncryptionModules());
@@ -251,7 +251,7 @@ class ManagerTest extends TestCase {
->method('getDisplayName')
->willReturn('TestDummyModule' . $id);
/** @var \OCP\Encryption\IEncryptionModule $encryptionModule */
- $manager->registerEncryptionModule('ID' . $id, 'TestDummyModule' . $id, function() use ($encryptionModule) {
+ $manager->registerEncryptionModule('ID' . $id, 'TestDummyModule' . $id, function () use ($encryptionModule) {
return $encryptionModule;
});
}
diff --git a/tests/lib/Encryption/UpdateTest.php b/tests/lib/Encryption/UpdateTest.php
index 4509a1f5fec..a783c620a5b 100644
--- a/tests/lib/Encryption/UpdateTest.php
+++ b/tests/lib/Encryption/UpdateTest.php
@@ -147,7 +147,7 @@ class UpdateTest extends TestCase {
} else {
$updateMock->expects($this->once())
->method('getOwnerPath')
- ->willReturnCallback(function($path) use ($target) {
+ ->willReturnCallback(function ($path) use ($target) {
$this->assertSame(
$target,
$path,