aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-09-20 17:38:36 +0200
committerCôme Chilliet <come.chilliet@nextcloud.com>2024-09-20 17:51:00 +0200
commit1a4978c4ead55daa2726df5967c1377d61a57f7a (patch)
tree88c8a82ed52b8698be9e0cd4e9cef29b3c0d8ea1 /apps/dav/lib/CardDAV
parent6db9cbfdeb7dd475a258c1c2f2c163c41856d6c2 (diff)
downloadnextcloud-server-1a4978c4ead55daa2726df5967c1377d61a57f7a.tar.gz
nextcloud-server-1a4978c4ead55daa2726df5967c1377d61a57f7a.zip
chore: Apply rector configuration to apps folder
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/dav/lib/CardDAV')
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php8
-rw-r--r--apps/dav/lib/CardDAV/SyncService.php6
2 files changed, 7 insertions, 7 deletions
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<string> $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();