From 353200620f83d2f52ffb4ecb076629eb200c92bf Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 17 Sep 2024 23:25:09 +0200 Subject: [PATCH] refactor: Add void to PHPUnit test methods Signed-off-by: Christoph Wurst --- rector.php | 6 +++++- tests/Unit/Service/Sync/SyncServiceTest.php | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rector.php b/rector.php index aec92a3cd6..5c76bdc782 100644 --- a/rector.php +++ b/rector.php @@ -8,6 +8,7 @@ */ use Rector\Config\RectorConfig; +use Rector\TypeDeclaration\Rector\Class_\AddTestsVoidReturnTypeWhereNoReturnRector; return RectorConfig::configure() ->withPaths([ @@ -23,4 +24,7 @@ ) ->withPhpSets( php73: true, - ); + ) + ->withRules([ + AddTestsVoidReturnTypeWhereNoReturnRector::class, + ]); diff --git a/tests/Unit/Service/Sync/SyncServiceTest.php b/tests/Unit/Service/Sync/SyncServiceTest.php index d811ea4577..f3a73375be 100644 --- a/tests/Unit/Service/Sync/SyncServiceTest.php +++ b/tests/Unit/Service/Sync/SyncServiceTest.php @@ -81,7 +81,7 @@ protected function setUp(): void { ); } - public function testPartialSyncOnUncachedMailbox() { + public function testPartialSyncOnUncachedMailbox(): void { $account = $this->createMock(Account::class); $mailbox = $this->createMock(Mailbox::class); $mailbox->expects($this->once()) @@ -100,7 +100,7 @@ public function testPartialSyncOnUncachedMailbox() { ); } - public function testSyncMailboxReturnsFolderStats() { + public function testSyncMailboxReturnsFolderStats(): void { $account = $this->createMock(Account::class); $account->method('getUserId')->willReturn('user'); $mailbox = new Mailbox();