diff options
author | Anna Larch <anna@nextcloud.com> | 2024-09-05 21:23:38 +0200 |
---|---|---|
committer | Anna Larch <anna@nextcloud.com> | 2024-09-05 21:23:38 +0200 |
commit | 8af7ecb2576071f170ecbb0aa2311b26581e40e2 (patch) | |
tree | 9a8f3595cb28493368f78b0a049254d0a256b3c1 /apps/dav/lib | |
parent | 4566cf791d55f1202f4a1888b9cd23a7be0ed2c9 (diff) | |
download | nextcloud-server-8af7ecb2576071f170ecbb0aa2311b26581e40e2.tar.gz nextcloud-server-8af7ecb2576071f170ecbb0aa2311b26581e40e2.zip |
chore: adjust code to adhere to coding standard
Signed-off-by: Anna Larch <anna@nextcloud.com>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/BackgroundJob/UserStatusAutomation.php | 12 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 8 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/CalendarHome.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/CalendarImpl.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/EventComparisonService.php | 14 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/ReminderService.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipPlugin.php | 8 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/IMipService.php | 20 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Status/StatusService.php | 20 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php | 6 | ||||
-rw-r--r-- | apps/dav/lib/DAV/Sharing/Backend.php | 10 | ||||
-rw-r--r-- | apps/dav/lib/Migration/Version1027Date20230504122946.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/Migration/Version1029Date20221114151721.php | 2 |
14 files changed, 56 insertions, 56 deletions
diff --git a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php index 1593be49a5d..f9c4d8dcd74 100644 --- a/apps/dav/lib/BackgroundJob/UserStatusAutomation.php +++ b/apps/dav/lib/BackgroundJob/UserStatusAutomation.php @@ -55,14 +55,14 @@ class UserStatusAutomation extends TimedJob { $userId = $argument['userId']; $user = $this->userManager->get($userId); - if($user === null) { + if ($user === null) { return; } $ooo = $this->coordinator->getCurrentOutOfOfficeData($user); $continue = $this->processOutOfOfficeData($user, $ooo); - if($continue === false) { + if ($continue === false) { return; } @@ -196,7 +196,7 @@ class UserStatusAutomation extends TimedJob { return; } - if(!$hasDndForOfficeHours) { + if (!$hasDndForOfficeHours) { // Office hours are not set to DND, so there is nothing to do. return; } @@ -207,7 +207,7 @@ class UserStatusAutomation extends TimedJob { } private function processOutOfOfficeData(IUser $user, ?IOutOfOfficeData $ooo): bool { - if(empty($ooo)) { + if (empty($ooo)) { // Reset the user status if the absence doesn't exist $this->logger->debug('User has no OOO period in effect, reverting DND status if applicable'); $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_OUT_OF_OFFICE, IUserStatus::DND); @@ -215,12 +215,12 @@ class UserStatusAutomation extends TimedJob { return true; } - if(!$this->coordinator->isInEffect($ooo)) { + if (!$this->coordinator->isInEffect($ooo)) { // Reset the user status if the absence is (no longer) in effect $this->logger->debug('User has no OOO period in effect, reverting DND status if applicable'); $this->manager->revertUserStatus($user->getUID(), IUserStatus::MESSAGE_OUT_OF_OFFICE, IUserStatus::DND); - if($ooo->getStartDate() > $this->time->getTime()) { + if ($ooo->getStartDate() > $this->time->getTime()) { // Set the next run to take place at the start of the ooo period if it is in the future // This might be overwritten if there is an availability setting, but we can't determine // if this is the case here diff --git a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php index 733e8079111..de5b1139880 100644 --- a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php +++ b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php @@ -115,7 +115,7 @@ class EnablePlugin extends ServerPlugin { } $owner = substr($node->getOwner(), 17); - if($owner !== $this->user->getUID()) { + if ($owner !== $this->user->getUID()) { $this->server->httpResponse->setStatus(403); return false; } diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index e35604e8497..43a22651747 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2815,7 +2815,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription ->setMaxResults($limit); $result = $query->executeQuery(); $count = $result->rowCount(); - if($count === 0) { + if ($count === 0) { return; } $ids = array_map(static function (array $id) { @@ -2827,12 +2827,12 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $deleteQuery = $this->db->getQueryBuilder(); $deleteQuery->delete('schedulingobjects') ->where($deleteQuery->expr()->in('id', $deleteQuery->createParameter('ids'), IQueryBuilder::PARAM_INT_ARRAY)); - foreach(array_chunk($ids, 1000) as $chunk) { + foreach (array_chunk($ids, 1000) as $chunk) { $deleteQuery->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY); $numDeleted += $deleteQuery->executeStatement(); } - if($numDeleted === $limit) { + if ($numDeleted === $limit) { $this->logger->info("Deleted $limit scheduling objects, continuing with next batch"); $this->deleteOutdatedSchedulingObjects($modifiedBefore, $limit); } @@ -3307,7 +3307,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param array<string> $calendarObjectUris */ public function purgeCachedEventsForSubscription(int $subscriptionId, array $calendarObjectIds, array $calendarObjectUris): void { - if(empty($calendarObjectUris)) { + if (empty($calendarObjectUris)) { return; } diff --git a/apps/dav/lib/CalDAV/CalendarHome.php b/apps/dav/lib/CalDAV/CalendarHome.php index d01c2affbc8..59a976ca6bc 100644 --- a/apps/dav/lib/CalDAV/CalendarHome.php +++ b/apps/dav/lib/CalDAV/CalendarHome.php @@ -149,9 +149,9 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome { // Calendar - this covers all "regular" calendars, but not shared // only check if the method is available - if($this->caldavBackend instanceof CalDavBackend) { + if ($this->caldavBackend instanceof CalDavBackend) { $calendar = $this->caldavBackend->getCalendarByUri($this->principalInfo['uri'], $name); - if(!empty($calendar)) { + if (!empty($calendar)) { return new Calendar($this->caldavBackend, $calendar, $this->l10n, $this->config, $this->logger); } } diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php index bba1603c325..ea2ac0e9a62 100644 --- a/apps/dav/lib/CalDAV/CalendarImpl.php +++ b/apps/dav/lib/CalDAV/CalendarImpl.php @@ -84,7 +84,7 @@ class CalendarImpl implements ICreateFromString, IHandleImipMessage { /** @var VCalendar $vobj */ $vobj = Reader::read($timezoneProp); $components = $vobj->getComponents(); - if(empty($components)) { + if (empty($components)) { return null; } /** @var VTimeZone $vtimezone */ diff --git a/apps/dav/lib/CalDAV/EventComparisonService.php b/apps/dav/lib/CalDAV/EventComparisonService.php index e3c7749a772..63395e7ce1c 100644 --- a/apps/dav/lib/CalDAV/EventComparisonService.php +++ b/apps/dav/lib/CalDAV/EventComparisonService.php @@ -37,14 +37,14 @@ class EventComparisonService { */ private function removeIfUnchanged(VEvent $filterEvent, array &$eventsToFilter): bool { $filterEventData = []; - foreach(self::EVENT_DIFF as $eventDiff) { + foreach (self::EVENT_DIFF as $eventDiff) { $filterEventData[] = IMipService::readPropertyWithDefault($filterEvent, $eventDiff, ''); } /** @var VEvent $component */ foreach ($eventsToFilter as $k => $eventToFilter) { $eventToFilterData = []; - foreach(self::EVENT_DIFF as $eventDiff) { + foreach (self::EVENT_DIFF as $eventDiff) { $eventToFilterData[] = IMipService::readPropertyWithDefault($eventToFilter, $eventDiff, ''); } // events are identical and can be removed @@ -73,23 +73,23 @@ class EventComparisonService { $newEventComponents = $new->getComponents(); foreach ($newEventComponents as $k => $event) { - if(!$event instanceof VEvent) { + if (!$event instanceof VEvent) { unset($newEventComponents[$k]); } } - if(empty($old)) { + if (empty($old)) { return ['old' => null, 'new' => $newEventComponents]; } $oldEventComponents = $old->getComponents(); - if(is_array($oldEventComponents) && !empty($oldEventComponents)) { + if (is_array($oldEventComponents) && !empty($oldEventComponents)) { foreach ($oldEventComponents as $k => $event) { - if(!$event instanceof VEvent) { + if (!$event instanceof VEvent) { unset($oldEventComponents[$k]); continue; } - if($this->removeIfUnchanged($event, $newEventComponents)) { + if ($this->removeIfUnchanged($event, $newEventComponents)) { unset($oldEventComponents[$k]); } } diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php index 4ac9e83ef08..b6032e733d9 100644 --- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php +++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php @@ -447,7 +447,7 @@ class ReminderService { $uniqueReminders = []; foreach ($reminders as $reminder) { $key = $reminder['notification_date']. $reminder['event_hash'].$reminder['type']; - if(!isset($uniqueReminders[$key])) { + if (!isset($uniqueReminders[$key])) { $uniqueReminders[$key] = $reminder; } } diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php index 1958531630a..e46cd039fd5 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php @@ -94,7 +94,7 @@ class IMipPlugin extends SabreIMipPlugin { * @param bool $modified modified */ public function beforeWriteContent($uri, INode $node, $data, $modified): void { - if(!$node instanceof CalendarObject) { + if (!$node instanceof CalendarObject) { return; } /** @var VCalendar $vCalendar */ @@ -151,7 +151,7 @@ class IMipPlugin extends SabreIMipPlugin { // No changed events after all - this shouldn't happen if there is significant change yet here we are // The scheduling status is debatable - if(empty($vEvent)) { + if (empty($vEvent)) { $this->logger->warning('iTip message said the change was significant but comparison did not detect any updated VEvents'); $iTipMessage->scheduleStatus = '1.0;We got the message, but it\'s not significant enough to warrant an email'; return; @@ -163,14 +163,14 @@ class IMipPlugin extends SabreIMipPlugin { // we also might not have an old event as this could be a new // invitation, or a new recurrence exception $attendee = $this->imipService->getCurrentAttendee($iTipMessage); - if($attendee === null) { + if ($attendee === null) { $uid = $vEvent->UID ?? 'no UID found'; $this->logger->debug('Could not find recipient ' . $recipient . ' as attendee for event with UID ' . $uid); $iTipMessage->scheduleStatus = '5.0; EMail delivery failed'; return; } // Don't send emails to things - if($this->imipService->isRoomOrResource($attendee)) { + if ($this->imipService->isRoomOrResource($attendee)) { $this->logger->debug('No invitation sent as recipient is room or resource', [ 'attendee' => $recipient, ]); diff --git a/apps/dav/lib/CalDAV/Schedule/IMipService.php b/apps/dav/lib/CalDAV/Schedule/IMipService.php index 3d6317e6968..a101cb05db3 100644 --- a/apps/dav/lib/CalDAV/Schedule/IMipService.php +++ b/apps/dav/lib/CalDAV/Schedule/IMipService.php @@ -88,7 +88,7 @@ class IMipService { return $default; } $newstring = $vevent->$property->getValue(); - if(isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring) { + if (isset($oldVEvent->$property) && $oldVEvent->$property->getValue() !== $newstring) { $oldstring = $oldVEvent->$property->getValue(); return sprintf($strikethrough, $oldstring, $newstring); } @@ -143,7 +143,7 @@ class IMipService { $data = []; $data['meeting_when'] = $this->generateWhenString($eventReaderCurrent); - foreach(self::STRING_DIFF as $key => $property) { + foreach (self::STRING_DIFF as $key => $property) { $data[$key] = self::readPropertyWithDefault($vEvent, $property, $defaultVal); } @@ -153,7 +153,7 @@ class IMipService { $data['meeting_location_html'] = $locationHtml; } - if(!empty($oldVEvent)) { + if (!empty($oldVEvent)) { $oldMeetingWhen = $this->generateWhenString($eventReaderPrevious); $data['meeting_title_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'SUMMARY', $data['meeting_title']); $data['meeting_description_html'] = $this->generateDiffString($vEvent, $oldVEvent, 'DESCRIPTION', $data['meeting_description']); @@ -638,7 +638,7 @@ class IMipService { return $dtEnd->getDateTime()->getTimeStamp(); } - if(isset($component->DURATION)) { + if (isset($component->DURATION)) { /** @var \DateTime $endDate */ $endDate = clone $dtStart->getDateTime(); // $component->DTEND->getDateTime() returns DateTimeImmutable @@ -646,7 +646,7 @@ class IMipService { return $endDate->getTimestamp(); } - if(!$dtStart->hasTime()) { + if (!$dtStart->hasTime()) { /** @var \DateTime $endDate */ // $component->DTSTART->getDateTime() returns DateTimeImmutable $endDate = clone $dtStart->getDateTime(); @@ -662,7 +662,7 @@ class IMipService { * @param Property|null $attendee */ public function setL10n(?Property $attendee = null) { - if($attendee === null) { + if ($attendee === null) { return; } @@ -678,7 +678,7 @@ class IMipService { * @return bool */ public function getAttendeeRsvpOrReqForParticipant(?Property $attendee = null) { - if($attendee === null) { + if ($attendee === null) { return false; } @@ -786,10 +786,10 @@ class IMipService { htmlspecialchars($organizer->getNormalizedValue()), htmlspecialchars($organizerName ?: $organizerEmail)); $organizerText = sprintf('%s <%s>', $organizerName, $organizerEmail); - if(isset($organizer['PARTSTAT'])) { + if (isset($organizer['PARTSTAT'])) { /** @var Parameter $partstat */ $partstat = $organizer['PARTSTAT']; - if(strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { + if (strcasecmp($partstat->getValue(), 'ACCEPTED') === 0) { $organizerHTML .= ' ✔︎'; $organizerText .= ' ✔︎'; } @@ -961,7 +961,7 @@ class IMipService { public function isRoomOrResource(Property $attendee): bool { $cuType = $attendee->offsetGet('CUTYPE'); - if(!$cuType instanceof Parameter) { + if (!$cuType instanceof Parameter) { return false; } $type = $cuType->getValue() ?? 'INDIVIDUAL'; diff --git a/apps/dav/lib/CalDAV/Status/StatusService.php b/apps/dav/lib/CalDAV/Status/StatusService.php index 382621f1ba0..56eec5007b8 100644 --- a/apps/dav/lib/CalDAV/Status/StatusService.php +++ b/apps/dav/lib/CalDAV/Status/StatusService.php @@ -39,23 +39,23 @@ class StatusService { public function processCalendarStatus(string $userId): void { $user = $this->userManager->get($userId); - if($user === null) { + if ($user === null) { return; } $availability = $this->availabilityCoordinator->getCurrentOutOfOfficeData($user); - if($availability !== null && $this->availabilityCoordinator->isInEffect($availability)) { + if ($availability !== null && $this->availabilityCoordinator->isInEffect($availability)) { $this->logger->debug('An Absence is in effect, skipping calendar status check', ['user' => $userId]); return; } $calendarEvents = $this->cache->get($userId); - if($calendarEvents === null) { + if ($calendarEvents === null) { $calendarEvents = $this->getCalendarEvents($user); $this->cache->set($userId, $calendarEvents, 300); } - if(empty($calendarEvents)) { + if (empty($calendarEvents)) { try { $this->userStatusService->revertUserStatus($userId, IUserStatus::MESSAGE_CALENDAR_BUSY); } catch (Exception $e) { @@ -81,7 +81,7 @@ class StatusService { $currentStatus = null; } - if(($currentStatus !== null && $currentStatus->getMessageId() === IUserStatus::MESSAGE_CALL) + if (($currentStatus !== null && $currentStatus->getMessageId() === IUserStatus::MESSAGE_CALL) || ($currentStatus !== null && $currentStatus->getStatus() === IUserStatus::DND) || ($currentStatus !== null && $currentStatus->getStatus() === IUserStatus::INVISIBLE)) { // We don't overwrite the call status, DND status or Invisible status @@ -101,7 +101,7 @@ class StatusService { if (isset($component['DTSTART']) && $userStatusTimestamp !== null) { /** @var DateTimeImmutable $dateTime */ $dateTime = $component['DTSTART'][0]; - if($dateTime instanceof DateTimeImmutable && $userStatusTimestamp > $dateTime->getTimestamp()) { + if ($dateTime instanceof DateTimeImmutable && $userStatusTimestamp > $dateTime->getTimestamp()) { return false; } } @@ -112,7 +112,7 @@ class StatusService { return true; }); - if(empty($applicableEvents)) { + if (empty($applicableEvents)) { try { $this->userStatusService->revertUserStatus($userId, IUserStatus::MESSAGE_CALENDAR_BUSY); } catch (Exception $e) { @@ -130,7 +130,7 @@ class StatusService { } // Only update the status if it's neccesary otherwise we mess up the timestamp - if($currentStatus === null || $currentStatus->getMessageId() !== IUserStatus::MESSAGE_CALENDAR_BUSY) { + if ($currentStatus === null || $currentStatus->getMessageId() !== IUserStatus::MESSAGE_CALENDAR_BUSY) { // One event that fulfills all status conditions is enough // 1. Not an OOO event // 2. Current user status (that is not a calendar status) was not set after the start of this event @@ -148,7 +148,7 @@ class StatusService { private function getCalendarEvents(User $user): array { $calendars = $this->calendarManager->getCalendarsForPrincipal('principals/users/' . $user->getUID()); - if(empty($calendars)) { + if (empty($calendars)) { return []; } @@ -172,7 +172,7 @@ class StatusService { $dtEnd = DateTimeImmutable::createFromMutable($this->timeFactory->getDateTime('+5 minutes')); // Only query the calendars when there's any to search - if($query instanceof CalendarQuery && !empty($query->getCalendarUris())) { + if ($query instanceof CalendarQuery && !empty($query->getCalendarUris())) { // Query the next hour $query->setTimerangeStart($dtStart); $query->setTimerangeEnd($dtEnd); diff --git a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php index 1f2c006cdfe..47fd785d632 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php @@ -44,12 +44,12 @@ class RefreshWebcalService { } // Check the refresh rate if there is any - if(!empty($subscription['{http://apple.com/ns/ical/}refreshrate'])) { + if (!empty($subscription['{http://apple.com/ns/ical/}refreshrate'])) { // add the refresh interval to the lastmodified timestamp $refreshInterval = new \DateInterval($subscription['{http://apple.com/ns/ical/}refreshrate']); $updateTime = $this->time->getDateTime(); $updateTime->setTimestamp($subscription['lastmodified'])->add($refreshInterval); - if($updateTime->getTimestamp() > $this->time->getTime()) { + if ($updateTime->getTimestamp() > $this->time->getTime()) { return; } } @@ -136,7 +136,7 @@ class RefreshWebcalService { return $dataSet['uri']; }, $localData); - if(!empty($ids) && !empty($uris)) { + if (!empty($ids) && !empty($uris)) { // Clean up on aisle 5 // The only events left over in the $localData array should be those that don't exist upstream // All deleted VObjects from upstream are removed diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 2e1a84b6bc8..3dac1cf18be 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -58,7 +58,7 @@ abstract class Backend { } // Don't add share for owner - if($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { + if ($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { continue; } @@ -83,7 +83,7 @@ abstract class Backend { } // Don't add unshare for owner - if($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { + if ($shareable->getOwner() !== null && strcasecmp($shareable->getOwner(), $principal) === 0) { continue; } @@ -92,7 +92,7 @@ abstract class Backend { // Check if a user has a groupshare that they're trying to free themselves from // If so we need to add a self::ACCESS_UNSHARED row - if(!str_contains($principal, 'group') + if (!str_contains($principal, 'group') && $this->service->hasGroupShare($oldShares) ) { $this->service->unshare($shareable->getResourceId(), $principal); @@ -130,7 +130,7 @@ abstract class Backend { $rows = $this->service->getShares($resourceId); $shares = []; - foreach($rows as $row) { + foreach ($rows as $row) { $p = $this->principalBackend->getPrincipalByPath($row['principaluri']); $shares[] = [ 'href' => "principal:{$row['principaluri']}", @@ -155,7 +155,7 @@ abstract class Backend { $rows = $this->service->getSharesForIds($resourceIds); $sharesByResource = array_fill_keys($resourceIds, []); - foreach($rows as $row) { + foreach ($rows as $row) { $resourceId = (int)$row['resourceid']; $p = $this->principalBackend->getPrincipalByPath($row['principaluri']); $sharesByResource[$resourceId][] = [ diff --git a/apps/dav/lib/Migration/Version1027Date20230504122946.php b/apps/dav/lib/Migration/Version1027Date20230504122946.php index 7b49c64453e..9e1d1701934 100644 --- a/apps/dav/lib/Migration/Version1027Date20230504122946.php +++ b/apps/dav/lib/Migration/Version1027Date20230504122946.php @@ -31,7 +31,7 @@ class Version1027Date20230504122946 extends SimpleMigrationStep { * @param array $options */ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { - if($this->userManager->countSeenUsers() > 100 || array_sum($this->userManager->countUsers()) > 100) { + if ($this->userManager->countSeenUsers() > 100 || array_sum($this->userManager->countUsers()) > 100) { $this->config->setAppValue('dav', 'needs_system_address_book_sync', 'yes'); $output->info('Could not sync system address books during update - too many user records have been found. Please call occ dav:sync-system-addressbook manually.'); return; diff --git a/apps/dav/lib/Migration/Version1029Date20221114151721.php b/apps/dav/lib/Migration/Version1029Date20221114151721.php index 05b04486c88..dba5e0b1a48 100644 --- a/apps/dav/lib/Migration/Version1029Date20221114151721.php +++ b/apps/dav/lib/Migration/Version1029Date20221114151721.php @@ -28,7 +28,7 @@ class Version1029Date20221114151721 extends SimpleMigrationStep { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); $calendarObjectsTable = $schema->getTable('calendarobjects'); - if(!$calendarObjectsTable->hasIndex('calobj_clssfction_index')) { + if (!$calendarObjectsTable->hasIndex('calobj_clssfction_index')) { $calendarObjectsTable->addIndex(['classification'], 'calobj_clssfction_index'); return $schema; } |