diff options
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r-- | apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/CalDavBackend.php | 14 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Calendar.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Publishing/PublishPlugin.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/ReminderService.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php | 4 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Schedule/Plugin.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php | 4 |
8 files changed, 19 insertions, 19 deletions
diff --git a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php index 0e6436a7b09..a1ebd409f0e 100644 --- a/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php +++ b/apps/dav/lib/CalDAV/BirthdayCalendar/EnablePlugin.php @@ -87,7 +87,7 @@ class EnablePlugin extends ServerPlugin { * * @return string */ - public function getPluginName() { + public function getPluginName() { return 'nc-enable-birthday-calendar'; } diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index cf06cb5ab25..f947ea9d01e 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -308,7 +308,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $principals = $this->principalBackend->getGroupMembership($principalUriOriginal, true); $principals = array_merge($principals, $this->principalBackend->getCircleMembership($principalUriOriginal)); - $principals = array_map(function($principal) { + $principals = array_map(function ($principal) { return urldecode($principal); }, $principals); $principals[]= $principalUri; @@ -800,7 +800,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($calendarId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($calendarId) { $newValues = []; foreach ($mutations as $propertyName => $propertyValue) { @@ -1587,7 +1587,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $result = $outerQuery->execute(); $calendarObjects = $result->fetchAll(); - return array_map(function($o) { + return array_map(function ($o) { $calendarData = Reader::read($o['calendardata']); $comps = $calendarData->getComponents(); $objects = []; @@ -1605,10 +1605,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription 'type' => $o['componenttype'], 'uid' => $o['uid'], 'uri' => $o['uri'], - 'objects' => array_map(function($c) { + 'objects' => array_map(function ($c) { return $this->transformSearchData($c); }, $objects), - 'timezones' => array_map(function($c) { + 'timezones' => array_map(function ($c) { return $this->transformSearchData($c); }, $timezones), ]; @@ -1624,7 +1624,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** @var Component[] $subComponents */ $subComponents = $comp->getComponents(); /** @var Property[] $properties */ - $properties = array_filter($comp->children(), function($c) { + $properties = array_filter($comp->children(), function ($c) { return $c instanceof Property; }); $validationRules = $comp->getValidationRules(); @@ -1993,7 +1993,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription /** * @suppress SqlInjectionChecker */ - $propPatch->handle($supportedProperties, function($mutations) use ($subscriptionId) { + $propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) { $newValues = []; diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index 38598e30ce3..1c7e0106fb6 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -225,7 +225,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { parent::getOwner(), 'principals/system/public' ]; - return array_filter($acl, function($rule) use ($allowedPrincipals) { + return array_filter($acl, function ($rule) use ($allowedPrincipals) { return \in_array($rule['principal'], $allowedPrincipals, true); }); } @@ -246,7 +246,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { $this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) { $principal = 'principal:' . parent::getOwner(); $shares = $this->caldavBackend->getShares($this->getResourceId()); - $shares = array_filter($shares, function($share) use ($principal){ + $shares = array_filter($shares, function ($share) use ($principal) { return $share['href'] === $principal; }); if (empty($shares)) { diff --git a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php index 28e96e9b1d5..59b97312062 100644 --- a/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php +++ b/apps/dav/lib/CalDAV/Publishing/PublishPlugin.php @@ -95,7 +95,7 @@ class PublishPlugin extends ServerPlugin { * * @return string */ - public function getPluginName() { + public function getPluginName() { return 'oc-calendar-publishing'; } @@ -128,7 +128,7 @@ class PublishPlugin extends ServerPlugin { } }); - $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function() use ($node) { + $propFind->handle('{'.self::NS_CALENDARSERVER.'}allowed-sharing-modes', function () use ($node) { $canShare = (!$node->isSubscription() && $node->canWrite()); $canPublish = (!$node->isSubscription() && $node->canWrite()); diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php index fe4153fccf0..39fe4b248cb 100644 --- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php +++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php @@ -727,7 +727,7 @@ class ReminderService { * @return VObject\Component\VEvent[] */ private function getRecurrenceExceptionFromListOfVEvents(array $vevents):array { - return array_values(array_filter($vevents, function(VEvent $vevent) { + return array_values(array_filter($vevents, function (VEvent $vevent) { return $vevent->{'RECURRENCE-ID'} !== null; })); } @@ -737,7 +737,7 @@ class ReminderService { * @return VEvent|null */ private function getMasterItemFromListOfVEvents(array $vevents):?VEvent { - $elements = array_values(array_filter($vevents, function(VEvent $vevent) { + $elements = array_values(array_filter($vevents, function (VEvent $vevent) { return $vevent->{'RECURRENCE-ID'} === null; })); diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index 5a25fbaa22e..96b4371bd7c 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -305,11 +305,11 @@ abstract class AbstractPrincipalBackend implements BackendInterface { default: $rowsByMetadata = $this->searchPrincipalsByMetadataKey($prop, $value); - $filteredRows = array_filter($rowsByMetadata, function($row) use ($usersGroups) { + $filteredRows = array_filter($rowsByMetadata, function ($row) use ($usersGroups) { return $this->isAllowedToAccessResource($row, $usersGroups); }); - $results[] = array_map(function($row) { + $results[] = array_map(function ($row) { return $row['uri']; }, $filteredRows); diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 55a7b3ee691..7ad4a3904ed 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -261,7 +261,7 @@ EOF; */ function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) { if ($node instanceof IPrincipal) { - $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function() use ($node) { + $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function () use ($node) { /** @var \OCA\DAV\CalDAV\Plugin $caldavPlugin */ $caldavPlugin = $this->server->getPlugin('caldav'); $principalUrl = $node->getPrincipalUrl(); diff --git a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php index d25018c1298..d00e0886b61 100644 --- a/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php +++ b/apps/dav/lib/CalDAV/WebcalCaching/RefreshWebcalService.php @@ -166,7 +166,7 @@ class RefreshWebcalService { public function getSubscription(string $principalUri, string $uri) { $subscriptions = array_values(array_filter( $this->calDavBackend->getSubscriptionsForUser($principalUri), - function($sub) use ($uri) { + function ($sub) use ($uri) { return $sub['uri'] === $uri; } )); @@ -197,7 +197,7 @@ class RefreshWebcalService { ->withHeader('Accept', 'text/calendar, application/calendar+json, application/calendar+xml') ->withHeader('User-Agent', 'Nextcloud Webcal Crawler'); })); - $handlerStack->push(Middleware::mapResponse(function(ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { + $handlerStack->push(Middleware::mapResponse(function (ResponseInterface $response) use (&$didBreak301Chain, &$latestLocation) { if (!$didBreak301Chain) { if ($response->getStatusCode() !== 301) { $didBreak301Chain = true; |