aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Collaboration/Collaborators
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 14:19:56 +0200
commitcaff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch)
tree186d494c2aea5dea7255d3584ef5d595fc6e6194 /tests/lib/Collaboration/Collaborators
parentedf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff)
downloadnextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.tar.gz
nextcloud-server-caff1023ea72bb2ea94130e18a2a6e2ccf819e5f.zip
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Collaboration/Collaborators')
-rw-r--r--tests/lib/Collaboration/Collaborators/GroupPluginTest.php4
-rw-r--r--tests/lib/Collaboration/Collaborators/MailPluginTest.php3
-rw-r--r--tests/lib/Collaboration/Collaborators/RemotePluginTest.php3
-rw-r--r--tests/lib/Collaboration/Collaborators/SearchResultTest.php1
-rw-r--r--tests/lib/Collaboration/Collaborators/SearchTest.php6
-rw-r--r--tests/lib/Collaboration/Collaborators/UserPluginTest.php1
6 files changed, 6 insertions, 12 deletions
diff --git a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
index ac84ef04d33..909a11596a3 100644
--- a/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/GroupPluginTest.php
@@ -429,7 +429,6 @@ class GroupPluginTest extends TestCase {
false,
],
];
-
}
/**
@@ -459,8 +458,7 @@ class GroupPluginTest extends TestCase {
$this->config->expects($this->any())
->method('getAppValue')
->willReturnCallback(
- function ($appName, $key, $default) use ($shareWithGroupOnly, $shareeEnumeration)
- {
+ function ($appName, $key, $default) use ($shareWithGroupOnly, $shareeEnumeration) {
if ($appName === 'core' && $key === 'shareapi_only_share_with_group_members') {
return $shareWithGroupOnly ? 'yes' : 'no';
} elseif ($appName === 'core' && $key === 'shareapi_allow_share_dialog_user_enumeration') {
diff --git a/tests/lib/Collaboration/Collaborators/MailPluginTest.php b/tests/lib/Collaboration/Collaborators/MailPluginTest.php
index f2d4ce0cf70..613208d27b1 100644
--- a/tests/lib/Collaboration/Collaborators/MailPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/MailPluginTest.php
@@ -86,8 +86,7 @@ class MailPluginTest extends TestCase {
$this->config->expects($this->any())
->method('getAppValue')
->willReturnCallback(
- function ($appName, $key, $default) use ($shareeEnumeration)
- {
+ function ($appName, $key, $default) use ($shareeEnumeration) {
if ($appName === 'core' && $key === 'shareapi_allow_share_dialog_user_enumeration') {
return $shareeEnumeration ? 'yes' : 'no';
}
diff --git a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
index d85fadad408..a651d4ec1d4 100644
--- a/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/RemotePluginTest.php
@@ -92,8 +92,7 @@ class RemotePluginTest extends TestCase {
$this->config->expects($this->any())
->method('getAppValue')
->willReturnCallback(
- function ($appName, $key, $default) use ($shareeEnumeration)
- {
+ function ($appName, $key, $default) use ($shareeEnumeration) {
if ($appName === 'core' && $key === 'shareapi_allow_share_dialog_user_enumeration') {
return $shareeEnumeration ? 'yes' : 'no';
}
diff --git a/tests/lib/Collaboration/Collaborators/SearchResultTest.php b/tests/lib/Collaboration/Collaborators/SearchResultTest.php
index 45ce0b4c1b8..84d270de547 100644
--- a/tests/lib/Collaboration/Collaborators/SearchResultTest.php
+++ b/tests/lib/Collaboration/Collaborators/SearchResultTest.php
@@ -98,5 +98,4 @@ class SearchResultTest extends TestCase {
$this->assertSame($expected, $result->hasResult(new SearchResultType($type), $id));
}
-
}
diff --git a/tests/lib/Collaboration/Collaborators/SearchTest.php b/tests/lib/Collaboration/Collaborators/SearchTest.php
index 521ea0737ed..1b68e8eacc1 100644
--- a/tests/lib/Collaboration/Collaborators/SearchTest.php
+++ b/tests/lib/Collaboration/Collaborators/SearchTest.php
@@ -94,10 +94,10 @@ class SearchTest extends TestCase {
$remotePlugin->expects($this->any())
->method('search')
->willReturnCallback(function () use ($searchResult, $mockedRemotesResult, $expectedMoreResults) {
- if($mockedRemotesResult !== null) {
+ if ($mockedRemotesResult !== null) {
$type = new SearchResultType('remotes');
$searchResult->addResultSet($type, $mockedRemotesResult['results'], $mockedRemotesResult['exact']);
- if($mockedRemotesResult['exactIdMatch'] === true) {
+ if ($mockedRemotesResult['exactIdMatch'] === true) {
$searchResult->markExactIdMatch($type);
}
}
@@ -107,7 +107,7 @@ class SearchTest extends TestCase {
$this->container->expects($this->any())
->method('resolve')
->willReturnCallback(function ($class) use ($searchResult, $userPlugin, $groupPlugin, $remotePlugin) {
- if($class === SearchResult::class) {
+ if ($class === SearchResult::class) {
return $searchResult;
} elseif ($class === $userPlugin) {
return $userPlugin;
diff --git a/tests/lib/Collaboration/Collaborators/UserPluginTest.php b/tests/lib/Collaboration/Collaborators/UserPluginTest.php
index bba061f8e2b..07bcce93529 100644
--- a/tests/lib/Collaboration/Collaborators/UserPluginTest.php
+++ b/tests/lib/Collaboration/Collaborators/UserPluginTest.php
@@ -105,7 +105,6 @@ class UserPluginTest extends TestCase {
return $default;
}
);
-
}
public function getUserMock($uid, $displayName, $enabled = true, $groups = []) {