aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
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/CalDAV
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/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index b8dfe762e35..101bf36617a 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -865,7 +865,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @return void
*/
public function deleteCalendar($calendarId, bool $forceDeletePermanently = false) {
- $this->atomic(function () use ($calendarId, $forceDeletePermanently) {
+ $this->atomic(function () use ($calendarId, $forceDeletePermanently): void {
// The calendar is deleted right away if this is either enforced by the caller
// or the special contacts birthday calendar or when the preference of an empty
// retention (0 seconds) is set, which signals a disabled trashbin.
@@ -926,7 +926,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
public function restoreCalendar(int $id): void {
- $this->atomic(function () use ($id) {
+ $this->atomic(function () use ($id): void {
$qb = $this->db->getQueryBuilder();
$update = $qb->update('calendars')
->set('deleted_at', $qb->createNamedParameter(null))
@@ -1471,7 +1471,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
*/
public function deleteCalendarObject($calendarId, $objectUri, $calendarType = self::CALENDAR_TYPE_CALENDAR, bool $forceDeletePermanently = false) {
$this->cachedObjects = [];
- $this->atomic(function () use ($calendarId, $objectUri, $calendarType, $forceDeletePermanently) {
+ $this->atomic(function () use ($calendarId, $objectUri, $calendarType, $forceDeletePermanently): void {
$data = $this->getCalendarObject($calendarId, $objectUri, $calendarType);
if ($data === null) {
@@ -1553,7 +1553,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
*/
public function restoreCalendarObject(array $objectData): void {
$this->cachedObjects = [];
- $this->atomic(function () use ($objectData) {
+ $this->atomic(function () use ($objectData): void {
$id = (int)$objectData['id'];
$restoreUri = str_replace('-deleted.ics', '.ics', $objectData['uri']);
$targetObject = $this->getCalendarObject(
@@ -2697,7 +2697,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @return void
*/
public function deleteSubscription($subscriptionId) {
- $this->atomic(function () use ($subscriptionId) {
+ $this->atomic(function () use ($subscriptionId): void {
$subscriptionRow = $this->getSubscriptionById($subscriptionId);
$query = $this->db->getQueryBuilder();
@@ -2889,7 +2889,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$this->cachedObjects = [];
$table = $calendarType === self::CALENDAR_TYPE_CALENDAR ? 'calendars': 'calendarsubscriptions';
- $this->atomic(function () use ($calendarId, $objectUris, $operation, $calendarType, $table) {
+ $this->atomic(function () use ($calendarId, $objectUris, $operation, $calendarType, $table): void {
$query = $this->db->getQueryBuilder();
$query->select('synctoken')
->from($table)
@@ -2924,7 +2924,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
public function restoreChanges(int $calendarId, int $calendarType = self::CALENDAR_TYPE_CALENDAR): void {
$this->cachedObjects = [];
- $this->atomic(function () use ($calendarId, $calendarType) {
+ $this->atomic(function () use ($calendarId, $calendarType): void {
$qbAdded = $this->db->getQueryBuilder();
$qbAdded->select('uri')
->from('calendarobjects')
@@ -3090,7 +3090,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @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 {
$calendarId = $shareable->getResourceId();
$calendarRow = $this->getCalendarById($calendarId);
if ($calendarRow === null) {
@@ -3188,7 +3188,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
*/
public function updateProperties($calendarId, $objectUri, $calendarData, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$this->cachedObjects = [];
- $this->atomic(function () use ($calendarId, $objectUri, $calendarData, $calendarType) {
+ $this->atomic(function () use ($calendarId, $objectUri, $calendarData, $calendarType): void {
$objectId = $this->getCalendarObjectId($calendarId, $objectUri, $calendarType);
try {
@@ -3260,7 +3260,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* deletes all birthday calendars
*/
public function deleteAllBirthdayCalendars() {
- $this->atomic(function () {
+ $this->atomic(function (): void {
$query = $this->db->getQueryBuilder();
$result = $query->select(['id'])->from('calendars')
->where($query->expr()->eq('uri', $query->createNamedParameter(BirthdayService::BIRTHDAY_CALENDAR_URI)))
@@ -3280,7 +3280,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param $subscriptionId
*/
public function purgeAllCachedEventsForSubscription($subscriptionId) {
- $this->atomic(function () use ($subscriptionId) {
+ $this->atomic(function () use ($subscriptionId): void {
$query = $this->db->getQueryBuilder();
$query->select('uri')
->from('calendarobjects')
@@ -3326,7 +3326,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
return;
}
- $this->atomic(function () use ($subscriptionId, $calendarObjectIds, $calendarObjectUris) {
+ $this->atomic(function () use ($subscriptionId, $calendarObjectIds, $calendarObjectUris): void {
foreach (array_chunk($calendarObjectIds, 1000) as $chunk) {
$query = $this->db->getQueryBuilder();
$query->delete($this->dbObjectPropertiesTable)