From 7e58aa1a05b01d2db0a1c32f63fd622566d38334 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 31 Mar 2023 09:43:56 +0200 Subject: [PATCH] Fix DAV types Signed-off-by: jld3103 --- apps/dav/lib/CalDAV/EventComparisonService.php | 2 +- apps/dav/lib/CardDAV/CardDavBackend.php | 3 ++- apps/dav/lib/DAV/CustomPropertiesBackend.php | 2 +- apps/dav/lib/Events/CalendarShareUpdatedEvent.php | 6 +++--- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/dav/lib/CalDAV/EventComparisonService.php b/apps/dav/lib/CalDAV/EventComparisonService.php index 0fd4d08e83e9b..d8d6ea07ed241 100644 --- a/apps/dav/lib/CalDAV/EventComparisonService.php +++ b/apps/dav/lib/CalDAV/EventComparisonService.php @@ -90,7 +90,7 @@ private function removeIfUnchanged(VEvent $filterEvent, array &$eventsToFilter): * * @param VCalendar $new * @param VCalendar|null $old - * @return array + * @return array */ public function findModified(VCalendar $new, ?VCalendar $old): array { $newEventComponents = $new->getComponents(); diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index ab21af1ce1048..666f1e7a85c1b 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -989,11 +989,12 @@ public function updateShares(IShareable $shareable, array $add, array $remove): * @param string $pattern which should match within the $searchProperties * @param array $searchProperties defines the properties within the query pattern should match * @param array $options = array() to define the search behavior + * - 'types' boolean (since 15.0.0) If set to true, fields that come with a TYPE property will be an array * - 'escape_like_param' - If set to false wildcards _ and % are not escaped, otherwise they are * - 'limit' - Set a numeric limit for the search results * - 'offset' - Set the offset for the limited search results * - 'wildcard' - Whether the search should use wildcards - * @psalm-param array{escape_like_param?: bool, limit?: int, offset?: int, wildcard?: bool} $options + * @psalm-param array{types?: bool, escape_like_param?: bool, limit?: int, offset?: int, wildcard?: bool} $options * @return array an array of contacts which are arrays of key-value-pairs */ public function search($addressBookId, $pattern, $searchProperties, $options = []): array { diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 0110990a408b6..3bc3ba33173a0 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -98,7 +98,7 @@ class CustomPropertiesBackend implements BackendInterface { /** * Properties set by one user, readable by all others * - * @var array[] + * @var string[] */ private const PUBLISHED_READ_ONLY_PROPERTIES = [ '{urn:ietf:params:xml:ns:caldav}calendar-availability', diff --git a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php index d5a568d149bf6..dedd9f8a5663b 100644 --- a/apps/dav/lib/Events/CalendarShareUpdatedEvent.php +++ b/apps/dav/lib/Events/CalendarShareUpdatedEvent.php @@ -38,7 +38,7 @@ class CalendarShareUpdatedEvent extends Event { private int $calendarId; - /** @var array{id: int, uri: string, '{http://calendarserver.org/ns/}getctag': string, '{http://sabredav.org/ns}sync-token': int, '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set': SupportedCalendarComponentSet, '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp': ScheduleCalendarTransp } */ + /** @var array{id: int, uri: string, '{http://calendarserver.org/ns/}getctag': string, '{http://sabredav.org/ns}sync-token': int, '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set': SupportedCalendarComponentSet, '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp': ScheduleCalendarTransp, '{urn:ietf:params:xml:ns:caldav}calendar-timezone': ?string } */ private array $calendarData; /** @var list */ @@ -54,7 +54,7 @@ class CalendarShareUpdatedEvent extends Event { * CalendarShareUpdatedEvent constructor. * * @param int $calendarId - * @param array{id: int, uri: string, '{http://calendarserver.org/ns/}getctag': string, '{http://sabredav.org/ns}sync-token': int, '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set': SupportedCalendarComponentSet, '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp': ScheduleCalendarTransp } $calendarData + * @param array{id: int, uri: string, '{http://calendarserver.org/ns/}getctag': string, '{http://sabredav.org/ns}sync-token': int, '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set': SupportedCalendarComponentSet, '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp': ScheduleCalendarTransp, '{urn:ietf:params:xml:ns:caldav}calendar-timezone': ?string } $calendarData * @param list $oldShares * @param list $added * @param list $removed @@ -81,7 +81,7 @@ public function getCalendarId(): int { } /** - * @return array{id: int, uri: string, '{http://calendarserver.org/ns/}getctag': string, '{http://sabredav.org/ns}sync-token': int, '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set': SupportedCalendarComponentSet, '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp': ScheduleCalendarTransp } + * @return array{id: int, uri: string, '{http://calendarserver.org/ns/}getctag': string, '{http://sabredav.org/ns}sync-token': int, '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set': SupportedCalendarComponentSet, '{urn:ietf:params:xml:ns:caldav}schedule-calendar-transp': ScheduleCalendarTransp, '{urn:ietf:params:xml:ns:caldav}calendar-timezone': ?string } * @since 20.0.0 */ public function getCalendarData(): array {