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/dav/tests/unit/CalDAV/Reminder | |
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/dav/tests/unit/CalDAV/Reminder')
3 files changed, 3 insertions, 9 deletions
diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php index 5e18be27422..9004a42f98d 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/AudioProviderTest.php @@ -30,9 +30,7 @@ namespace OCA\DAV\Tests\unit\CalDAV\Reminder\NotificationProvider; use OCA\DAV\CalDAV\Reminder\NotificationProvider\AudioProvider; class AudioProviderTest extends PushProviderTest { - public function testNotificationType():void { $this->assertEquals(AudioProvider::NOTIFICATION_TYPE, 'AUDIO'); } - } diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php index 796ac38e1b2..cd111c44ae4 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotificationProvider/EmailProviderTest.php @@ -43,7 +43,6 @@ use OCP\Mail\IMessage; use Sabre\VObject\Component\VCalendar; class EmailProviderTest extends AbstractNotificationProviderTest { - const USER_EMAIL = 'frodo@hobb.it'; /** @var ILogger|\PHPUnit\Framework\MockObject\MockObject */ diff --git a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php index 568a65b77d3..eb4e3310aab 100644 --- a/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php +++ b/apps/dav/tests/unit/CalDAV/Reminder/NotifierTest.php @@ -103,8 +103,7 @@ class NotifierTest extends TestCase { } - public function testPrepareWrongApp(): void - { + public function testPrepareWrongApp(): void { $this->expectException(\InvalidArgumentException::class); $this->expectExceptionMessage('Notification not from this app'); @@ -138,8 +137,7 @@ class NotifierTest extends TestCase { $this->notifier->prepare($notification, 'en'); } - public function dataPrepare(): array - { + public function dataPrepare(): array { return [ [ 'calendar_reminder', @@ -176,8 +174,7 @@ class NotifierTest extends TestCase { * @param string $message * @throws \Exception */ - public function testPrepare(string $subjectType, array $subjectParams, string $subject, array $messageParams, string $message): void - { + public function testPrepare(string $subjectType, array $subjectParams, string $subject, array $messageParams, string $message): void { /** @var INotification|\PHPUnit\Framework\MockObject\MockObject $notification */ $notification = $this->createMock(INotification::class); |