Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 14:53:40 +0300
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-09 14:54:22 +0300
commitafbd9c4e6ed834e713039f2cff88ba3eec03dadb (patch)
tree7d8721cf8fc0329d6b750db63798de67a162b090 /tests/lib/Share20
parent19e97e86c69ab128191439d6a17dacb5a630cf98 (diff)
Unify function spacing to PSR2 recommendation
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Share20')
-rw-r--r--tests/lib/Share20/DefaultShareProviderTest.php14
-rw-r--r--tests/lib/Share20/ManagerTest.php48
2 files changed, 31 insertions, 31 deletions
diff --git a/tests/lib/Share20/DefaultShareProviderTest.php b/tests/lib/Share20/DefaultShareProviderTest.php
index c3f663052ed..c0a869d0793 100644
--- a/tests/lib/Share20/DefaultShareProviderTest.php
+++ b/tests/lib/Share20/DefaultShareProviderTest.php
@@ -1767,7 +1767,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
}
$this->userManager->method('get')->willReturnCallback(
- function($userId) use ($users) {
+ function ($userId) use ($users) {
return $users[$userId];
}
);
@@ -1824,7 +1824,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
}
$this->userManager->method('get')->willReturnCallback(
- function($userId) use ($users) {
+ function ($userId) use ($users) {
return $users[$userId];
}
);
@@ -1890,7 +1890,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
}
$this->userManager->method('get')->willReturnCallback(
- function($userId) use ($users) {
+ function ($userId) use ($users) {
return $users[$userId];
}
);
@@ -1947,7 +1947,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
}
$this->userManager->method('get')->willReturnCallback(
- function($userId) use ($users) {
+ function ($userId) use ($users) {
return $users[$userId];
}
);
@@ -1960,7 +1960,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
}
$this->groupManager->method('get')->willReturnCallback(
- function($groupId) use ($groups) {
+ function ($groupId) use ($groups) {
return $groups[$groupId];
}
);
@@ -2025,7 +2025,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
}
$this->userManager->method('get')->willReturnCallback(
- function($userId) use ($users) {
+ function ($userId) use ($users) {
return $users[$userId];
}
);
@@ -2038,7 +2038,7 @@ class DefaultShareProviderTest extends \Test\TestCase {
}
$this->groupManager->method('get')->willReturnCallback(
- function($groupId) use ($groups) {
+ function ($groupId) use ($groups) {
return $groups[$groupId];
}
);
diff --git a/tests/lib/Share20/ManagerTest.php b/tests/lib/Share20/ManagerTest.php
index f48d776eb01..96bebc196f6 100644
--- a/tests/lib/Share20/ManagerTest.php
+++ b/tests/lib/Share20/ManagerTest.php
@@ -123,7 +123,7 @@ class ManagerTest extends \Test\TestCase {
$this->l10nFactory = $this->createMock(IFactory::class);
$this->l = $this->createMock(IL10N::class);
$this->l->method('t')
- ->willReturnCallback(function($text, $parameters = []) {
+ ->willReturnCallback(function ($text, $parameters = []) {
return vsprintf($text, $parameters);
});
@@ -233,7 +233,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
'OCP\Share::preUnshare',
- $this->callBack(function(GenericEvent $e) use ($share) {
+ $this->callBack(function (GenericEvent $e) use ($share) {
return $e->getSubject() === $share;
})
);
@@ -241,7 +241,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
'OCP\Share::postUnshare',
- $this->callBack(function(GenericEvent $e) use ($share) {
+ $this->callBack(function (GenericEvent $e) use ($share) {
return $e->getSubject() === $share &&
$e->getArgument('deletedShares') === [$share];
})
@@ -279,7 +279,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
'OCP\Share::preUnshare',
- $this->callBack(function(GenericEvent $e) use ($share) {
+ $this->callBack(function (GenericEvent $e) use ($share) {
return $e->getSubject() === $share;
})
);
@@ -287,7 +287,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
'OCP\Share::postUnshare',
- $this->callBack(function(GenericEvent $e) use ($share) {
+ $this->callBack(function (GenericEvent $e) use ($share) {
return $e->getSubject() === $share &&
$e->getArgument('deletedShares') === [$share];
})
@@ -348,7 +348,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
'OCP\Share::preUnshare',
- $this->callBack(function(GenericEvent $e) use ($share1) {
+ $this->callBack(function (GenericEvent $e) use ($share1) {
return $e->getSubject() === $share1;
})
);
@@ -356,7 +356,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
'OCP\Share::postUnshare',
- $this->callBack(function(GenericEvent $e) use ($share1, $share2, $share3) {
+ $this->callBack(function (GenericEvent $e) use ($share1, $share2, $share3) {
return $e->getSubject() === $share1 &&
$e->getArgument('deletedShares') === [$share3, $share2, $share1];
})
@@ -391,7 +391,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
'OCP\Share::postUnshareFromSelf',
- $this->callBack(function(GenericEvent $e) use ($share) {
+ $this->callBack(function (GenericEvent $e) use ($share) {
return $e->getSubject() === $share;
})
);
@@ -423,7 +423,7 @@ class ManagerTest extends \Test\TestCase {
$this->defaultProvider
->expects($this->exactly(4))
->method('getChildren')
- ->willReturnCallback(function($_share) use ($share, $shares) {
+ ->willReturnCallback(function ($_share) use ($share, $shares) {
if ($_share === $share) {
return $shares;
}
@@ -505,7 +505,7 @@ class ManagerTest extends \Test\TestCase {
]);
$this->eventDispatcher->expects($this->once())->method('dispatch')
- ->willReturnCallback(function(Event $event) {
+ ->willReturnCallback(function (Event $event) {
$this->assertInstanceOf(ValidatePasswordPolicyEvent::class, $event);
/** @var ValidatePasswordPolicyEvent $event */
$this->assertSame('password', $event->getPassword());
@@ -526,7 +526,7 @@ class ManagerTest extends \Test\TestCase {
]);
$this->eventDispatcher->expects($this->once())->method('dispatch')
- ->willReturnCallback(function(Event $event) {
+ ->willReturnCallback(function (Event $event) {
$this->assertInstanceOf(ValidatePasswordPolicyEvent::class, $event);
/** @var ValidatePasswordPolicyEvent $event */
$this->assertSame('password', $event->getPassword());
@@ -1773,7 +1773,7 @@ class ManagerTest extends \Test\TestCase {
->expects($this->once())
->method('create')
->with($share)
- ->willReturnCallback(function(Share $share) {
+ ->willReturnCallback(function (Share $share) {
return $share->setId(42);
});
@@ -1782,7 +1782,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
$this->equalTo('OCP\Share::preShare'),
- $this->callback(function(GenericEvent $e) use ($path, $date) {
+ $this->callback(function (GenericEvent $e) use ($path, $date) {
/** @var IShare $share */
$share = $e->getSubject();
@@ -1801,7 +1801,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
$this->equalTo('OCP\Share::postShare'),
- $this->callback(function(GenericEvent $e) use ($path, $date) {
+ $this->callback(function (GenericEvent $e) use ($path, $date) {
/** @var IShare $share */
$share = $e->getSubject();
@@ -1882,7 +1882,7 @@ class ManagerTest extends \Test\TestCase {
->expects($this->once())
->method('create')
->with($share)
- ->willReturnCallback(function(Share $share) {
+ ->willReturnCallback(function (Share $share) {
return $share->setId(42);
});
@@ -1891,7 +1891,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
$this->equalTo('OCP\Share::preShare'),
- $this->callback(function(GenericEvent $e) use ($path) {
+ $this->callback(function (GenericEvent $e) use ($path) {
/** @var IShare $share */
$share = $e->getSubject();
@@ -1910,7 +1910,7 @@ class ManagerTest extends \Test\TestCase {
->method('dispatch')
->with(
$this->equalTo('OCP\Share::postShare'),
- $this->callback(function(GenericEvent $e) use ($path) {
+ $this->callback(function (GenericEvent $e) use ($path) {
/** @var IShare $share */
$share = $e->getSubject();
@@ -1993,7 +1993,7 @@ class ManagerTest extends \Test\TestCase {
->with(
$this->equalTo('OCP\Share::preShare'),
$this->isInstanceOf(GenericEvent::class)
- )->willReturnCallback(function($name, GenericEvent $e) {
+ )->willReturnCallback(function ($name, GenericEvent $e) {
$e->setArgument('error', 'I won\'t let you share!');
$e->stopPropagation();
}
@@ -2145,7 +2145,7 @@ class ManagerTest extends \Test\TestCase {
*/
$this->defaultProvider
->method('getSharesBy')
- ->willReturnCallback(function($uid, $type, $node, $reshares, $limit, $offset) use (&$shares2) {
+ ->willReturnCallback(function ($uid, $type, $node, $reshares, $limit, $offset) use (&$shares2) {
return array_slice($shares2, $offset, $limit);
});
@@ -2153,7 +2153,7 @@ class ManagerTest extends \Test\TestCase {
* Simulate the deleteShare call.
*/
$manager->method('deleteShare')
- ->willReturnCallback(function($share) use (&$shares2) {
+ ->willReturnCallback(function ($share) use (&$shares2) {
for($i = 0; $i < count($shares2); $i++) {
if ($shares2[$i]->getId() === $share->getId()) {
array_splice($shares2, $i, 1);
@@ -2255,7 +2255,7 @@ class ManagerTest extends \Test\TestCase {
$factory->expects($this->any())
->method('getProviderForType')
- ->willReturnCallback(function($shareType) use ($roomShareProvider) {
+ ->willReturnCallback(function ($shareType) use ($roomShareProvider) {
if ($shareType !== \OCP\Share::SHARE_TYPE_ROOM) {
throw new Exception\ProviderException();
}
@@ -2464,7 +2464,7 @@ class ManagerTest extends \Test\TestCase {
->setPassword('passwordHash');
$this->hasher->method('verify')->with('password', 'passwordHash', '')
- ->willReturnCallback(function($pass, $hash, &$newHash) {
+ ->willReturnCallback(function ($pass, $hash, &$newHash) {
$newHash = 'newHash';
return true;
@@ -3741,12 +3741,12 @@ class ManagerTest extends \Test\TestCase {
$share4 = $this->createMock(IShare::class);
$this->defaultProvider->method('getAllShares')
- ->willReturnCallback(function() use ($share1, $share2) {
+ ->willReturnCallback(function () use ($share1, $share2) {
yield $share1;
yield $share2;
});
$extraProvider->method('getAllShares')
- ->willReturnCallback(function() use ($share3, $share4) {
+ ->willReturnCallback(function () use ($share3, $share4) {
yield $share3;
yield $share4;
});