From 1a4978c4ead55daa2726df5967c1377d61a57f7a Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Fri, 20 Sep 2024 17:38:36 +0200 Subject: chore: Apply rector configuration to apps folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/dav/lib/CardDAV/CardDavBackend.php | 8 ++++---- apps/dav/lib/CardDAV/SyncService.php | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'apps/dav/lib/CardDAV') diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 9dee61638a5..b94da9fa7ed 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -416,7 +416,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @return void */ public function deleteAddressBook($addressBookId) { - $this->atomic(function () use ($addressBookId) { + $this->atomic(function () use ($addressBookId): void { $addressBookId = (int)$addressBookId; $addressBookData = $this->getAddressBookById($addressBookId); $shares = $this->getShares($addressBookId); @@ -939,7 +939,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @return void */ protected function addChange(int $addressBookId, string $objectUri, int $operation): void { - $this->atomic(function () use ($addressBookId, $objectUri, $operation) { + $this->atomic(function () use ($addressBookId, $objectUri, $operation): void { $query = $this->db->getQueryBuilder(); $query->select('synctoken') ->from('addressbooks') @@ -1014,7 +1014,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param list $remove */ public function updateShares(IShareable $shareable, array $add, array $remove): void { - $this->atomic(function () use ($shareable, $add, $remove) { + $this->atomic(function () use ($shareable, $add, $remove): void { $addressBookId = $shareable->getResourceId(); $addressBookData = $this->getAddressBookById($addressBookId); $oldShares = $this->getShares($addressBookId); @@ -1292,7 +1292,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param string $vCardSerialized */ protected function updateProperties($addressBookId, $cardUri, $vCardSerialized) { - $this->atomic(function () use ($addressBookId, $cardUri, $vCardSerialized) { + $this->atomic(function () use ($addressBookId, $cardUri, $vCardSerialized): void { $cardId = $this->getCardId($addressBookId, $cardUri); $vCard = $this->readCard($vCardSerialized); diff --git a/apps/dav/lib/CardDAV/SyncService.php b/apps/dav/lib/CardDAV/SyncService.php index 02b862f1930..5f8752a9d49 100644 --- a/apps/dav/lib/CardDAV/SyncService.php +++ b/apps/dav/lib/CardDAV/SyncService.php @@ -77,7 +77,7 @@ class SyncService { $cardUri = basename($resource); if (isset($status[200])) { $vCard = $this->download($url, $userName, $sharedSecret, $resource); - $this->atomic(function () use ($addressBookId, $cardUri, $vCard) { + $this->atomic(function () use ($addressBookId, $cardUri, $vCard): void { $existingCard = $this->backend->getCard($addressBookId, $cardUri); if ($existingCard === false) { $this->backend->createCard($addressBookId, $cardUri, $vCard); @@ -200,7 +200,7 @@ class SyncService { $cardId = self::getCardUri($user); if ($user->isEnabled()) { - $this->atomic(function () use ($addressBookId, $cardId, $user) { + $this->atomic(function () use ($addressBookId, $cardId, $user): void { $card = $this->backend->getCard($addressBookId, $cardId); if ($card === false) { $vCard = $this->converter->createCardFromUser($user); @@ -251,7 +251,7 @@ class SyncService { */ public function syncInstance(?\Closure $progressCallback = null) { $systemAddressBook = $this->getLocalSystemAddressBook(); - $this->userManager->callForAllUsers(function ($user) use ($systemAddressBook, $progressCallback) { + $this->userManager->callForAllUsers(function ($user) use ($systemAddressBook, $progressCallback): void { $this->updateUser($user); if (!is_null($progressCallback)) { $progressCallback(); -- cgit v1.2.3