diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-04-10 14:19:56 +0200 |
commit | caff1023ea72bb2ea94130e18a2a6e2ccf819e5f (patch) | |
tree | 186d494c2aea5dea7255d3584ef5d595fc6e6194 /apps/comments/tests | |
parent | edf8ce32cffdb920e8171207b342abbd7f1fbe73 (diff) | |
download | nextcloud-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 'apps/comments/tests')
4 files changed, 3 insertions, 5 deletions
diff --git a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php index d6dd02da24f..dcf17896e49 100644 --- a/apps/comments/tests/Unit/AppInfo/ApplicationTest.php +++ b/apps/comments/tests/Unit/AppInfo/ApplicationTest.php @@ -64,7 +64,7 @@ class ApplicationTest extends TestCase { Notifier::class, ]; - foreach($services as $service) { + foreach ($services as $service) { $s = $c->query($service); $this->assertInstanceOf($service, $s); } diff --git a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php index 82df3dce5e0..f94d935e773 100644 --- a/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php +++ b/apps/comments/tests/Unit/Collaboration/CommentersSorterTest.php @@ -49,9 +49,9 @@ class CommentersSorterTest extends TestCase { */ public function testSort($data) { $commentMocks = []; - foreach($data['actors'] as $actorType => $actors) { + foreach ($data['actors'] as $actorType => $actors) { foreach ($actors as $actorId => $noOfComments) { - for($i=0;$i<$noOfComments;$i++) { + for ($i=0;$i<$noOfComments;$i++) { $mock = $this->createMock(IComment::class); $mock->expects($this->atLeastOnce()) ->method('getActorType') diff --git a/apps/comments/tests/Unit/EventHandlerTest.php b/apps/comments/tests/Unit/EventHandlerTest.php index 3dd5d3d68a2..bb1d660af1e 100644 --- a/apps/comments/tests/Unit/EventHandlerTest.php +++ b/apps/comments/tests/Unit/EventHandlerTest.php @@ -116,5 +116,4 @@ class EventHandlerTest extends TestCase { $this->eventHandler->handle($event); } - } diff --git a/apps/comments/tests/Unit/Notification/NotifierTest.php b/apps/comments/tests/Unit/Notification/NotifierTest.php index 390624c2c85..dbb79176320 100644 --- a/apps/comments/tests/Unit/Notification/NotifierTest.php +++ b/apps/comments/tests/Unit/Notification/NotifierTest.php @@ -616,5 +616,4 @@ class NotifierTest extends TestCase { $this->notifier->prepare($this->notification, $this->lc); } - } |