summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CalDAV
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-10-05 15:12:57 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-10-05 20:25:24 +0200
commitd9015a8c94bfd71fe484618a06d276701d3bf9ff (patch)
tree3f7a1cd6ec2fd982dd02de71b76076f7f01cef70 /apps/dav/lib/CalDAV
parentd357f4b10fe1b59e1e07bb90641d647522c7bfe2 (diff)
downloadnextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.tar.gz
nextcloud-server-d9015a8c94bfd71fe484618a06d276701d3bf9ff.zip
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/CalDAV')
-rw-r--r--apps/dav/lib/CalDAV/BirthdayService.php6
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php172
-rw-r--r--apps/dav/lib/CalDAV/Calendar.php4
-rw-r--r--apps/dav/lib/CalDAV/CalendarHome.php4
-rw-r--r--apps/dav/lib/CalDAV/CalendarImpl.php2
-rw-r--r--apps/dav/lib/CalDAV/Proxy/ProxyMapper.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/INotificationProvider.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php2
-rw-r--r--apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php4
-rw-r--r--apps/dav/lib/CalDAV/Reminder/ReminderService.php8
-rw-r--r--apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php2
-rw-r--r--apps/dav/lib/CalDAV/Schedule/IMipPlugin.php2
-rw-r--r--apps/dav/lib/CalDAV/Schedule/Plugin.php18
-rw-r--r--apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php18
-rw-r--r--apps/dav/lib/CalDAV/WebcalCaching/Plugin.php2
16 files changed, 125 insertions, 125 deletions
diff --git a/apps/dav/lib/CalDAV/BirthdayService.php b/apps/dav/lib/CalDAV/BirthdayService.php
index e64e886a01c..39e8d6c3940 100644
--- a/apps/dav/lib/CalDAV/BirthdayService.php
+++ b/apps/dav/lib/CalDAV/BirthdayService.php
@@ -166,7 +166,7 @@ class BirthdayService {
$this->calDavBackEnd->createCalendar($principal, self::BIRTHDAY_CALENDAR_URI, [
'{DAV:}displayname' => 'Contact birthdays',
'{http://apple.com/ns/ical/}calendar-color' => '#E9D859',
- 'components' => 'VEVENT',
+ 'components' => 'VEVENT',
]);
return $this->calDavBackEnd->getCalendarByUri($principal, self::BIRTHDAY_CALENDAR_URI);
@@ -427,8 +427,8 @@ class BirthdayService {
*/
private function formatTitle(string $field,
string $name,
- int $year=null,
- bool $supports4Byte=true):string {
+ int $year = null,
+ bool $supports4Byte = true):string {
if ($supports4Byte) {
switch ($field) {
case 'BDAY':
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php
index d0f88195e58..83c42c38639 100644
--- a/apps/dav/lib/CalDAV/CalDavBackend.php
+++ b/apps/dav/lib/CalDAV/CalDavBackend.php
@@ -126,11 +126,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @var array
*/
public $propertyMap = [
- '{DAV:}displayname' => 'displayname',
+ '{DAV:}displayname' => 'displayname',
'{urn:ietf:params:xml:ns:caldav}calendar-description' => 'description',
- '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'timezone',
- '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
- '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
+ '{urn:ietf:params:xml:ns:caldav}calendar-timezone' => 'timezone',
+ '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
+ '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
];
/**
@@ -139,12 +139,12 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @var array
*/
public $subscriptionPropertyMap = [
- '{DAV:}displayname' => 'displayname',
- '{http://apple.com/ns/ical/}refreshrate' => 'refreshrate',
- '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
- '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
- '{http://calendarserver.org/ns/}subscribed-strip-todos' => 'striptodos',
- '{http://calendarserver.org/ns/}subscribed-strip-alarms' => 'stripalarms',
+ '{DAV:}displayname' => 'displayname',
+ '{http://apple.com/ns/ical/}refreshrate' => 'refreshrate',
+ '{http://apple.com/ns/ical/}calendar-order' => 'calendarorder',
+ '{http://apple.com/ns/ical/}calendar-color' => 'calendarcolor',
+ '{http://calendarserver.org/ns/}subscribed-strip-todos' => 'striptodos',
+ '{http://calendarserver.org/ns/}subscribed-strip-alarms' => 'stripalarms',
'{http://calendarserver.org/ns/}subscribed-strip-attachments' => 'stripattachments',
];
@@ -311,7 +311,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}owner-principal' => $this->convertPrincipal($principalUri, !$this->legacyEndpoint),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -331,7 +331,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$principals = array_map(function ($principal) {
return urldecode($principal);
}, $principals);
- $principals[]= $principalUri;
+ $principals[] = $principalUri;
$fields = array_values($this->propertyMap);
$fields[] = 'a.id';
@@ -389,7 +389,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$readOnlyPropertyName => $readOnly,
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -436,7 +436,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet($components),
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -511,7 +511,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -577,7 +577,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}public' => (int)$row['access'] === self::ACCESS_PUBLIC,
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -629,7 +629,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -679,7 +679,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'{' . Plugin::NS_CALDAV . '}schedule-calendar-transp' => new ScheduleCalendarTransp($row['transparent']?'transparent':'opaque'),
];
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
$calendar[$xmlName] = $row[$dbName];
}
@@ -705,7 +705,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
->from('calendarsubscriptions')
->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId)))
->orderBy('calendarorder', 'asc');
- $stmt =$query->execute();
+ $stmt = $query->execute();
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
$stmt->closeCursor();
@@ -714,16 +714,16 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
$subscription = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'principaluri' => $row['principaluri'],
- 'source' => $row['source'],
+ 'source' => $row['source'],
'lastmodified' => $row['lastmodified'],
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
];
- foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
+ foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
if (!is_null($row[$dbName])) {
$subscription[$xmlName] = $row[$dbName];
}
@@ -746,11 +746,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
public function createCalendar($principalUri, $calendarUri, array $properties) {
$values = [
'principaluri' => $this->convertPrincipal($principalUri, true),
- 'uri' => $calendarUri,
- 'synctoken' => 1,
- 'transparent' => 0,
- 'components' => 'VEVENT,VTODO',
- 'displayname' => $calendarUri
+ 'uri' => $calendarUri,
+ 'synctoken' => 1,
+ 'transparent' => 0,
+ 'components' => 'VEVENT,VTODO',
+ 'displayname' => $calendarUri
];
// Default value
@@ -771,7 +771,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$values['transparent'] = (int) ($properties[$transp]->getValue() === 'transparent');
}
- foreach ($this->propertyMap as $xmlName=>$dbName) {
+ foreach ($this->propertyMap as $xmlName => $dbName) {
if (isset($properties[$xmlName])) {
$values[$dbName] = $properties[$xmlName];
}
@@ -939,7 +939,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getCalendarObjects($calendarId, $calendarType=self::CALENDAR_TYPE_CALENDAR):array {
+ public function getCalendarObjects($calendarId, $calendarType = self::CALENDAR_TYPE_CALENDAR):array {
$query = $this->db->getQueryBuilder();
$query->select(['id', 'uri', 'lastmodified', 'etag', 'calendarid', 'size', 'componenttype', 'classification'])
->from('calendarobjects')
@@ -950,14 +950,14 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$result = [];
foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$result[] = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'calendarid' => $row['calendarid'],
- 'size' => (int)$row['size'],
- 'component' => strtolower($row['componenttype']),
- 'classification'=> (int)$row['classification']
+ 'etag' => '"' . $row['etag'] . '"',
+ 'calendarid' => $row['calendarid'],
+ 'size' => (int)$row['size'],
+ 'component' => strtolower($row['componenttype']),
+ 'classification' => (int)$row['classification']
];
}
@@ -981,7 +981,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array|null
*/
- public function getCalendarObject($calendarId, $objectUri, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function getCalendarObject($calendarId, $objectUri, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$query = $this->db->getQueryBuilder();
$query->select(['id', 'uri', 'lastmodified', 'etag', 'calendarid', 'size', 'calendardata', 'componenttype', 'classification'])
->from('calendarobjects')
@@ -996,15 +996,15 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
return [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
- 'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'calendarid' => $row['calendarid'],
- 'size' => (int)$row['size'],
- 'calendardata' => $this->readBlob($row['calendardata']),
- 'component' => strtolower($row['componenttype']),
- 'classification'=> (int)$row['classification']
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
+ 'lastmodified' => $row['lastmodified'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'calendarid' => $row['calendarid'],
+ 'size' => (int)$row['size'],
+ 'calendardata' => $this->readBlob($row['calendardata']),
+ 'component' => strtolower($row['componenttype']),
+ 'classification' => (int)$row['classification']
];
}
@@ -1021,7 +1021,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getMultipleCalendarObjects($calendarId, array $uris, $calendarType=self::CALENDAR_TYPE_CALENDAR):array {
+ public function getMultipleCalendarObjects($calendarId, array $uris, $calendarType = self::CALENDAR_TYPE_CALENDAR):array {
if (empty($uris)) {
return [];
}
@@ -1042,14 +1042,14 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
while ($row = $result->fetch()) {
$objects[] = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'calendarid' => $row['calendarid'],
- 'size' => (int)$row['size'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'calendarid' => $row['calendarid'],
+ 'size' => (int)$row['size'],
'calendardata' => $this->readBlob($row['calendardata']),
- 'component' => strtolower($row['componenttype']),
+ 'component' => strtolower($row['componenttype']),
'classification' => (int)$row['classification']
];
}
@@ -1078,7 +1078,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return string
*/
- public function createCalendarObject($calendarId, $objectUri, $calendarData, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function createCalendarObject($calendarId, $objectUri, $calendarData, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$extraData = $this->getDenormalizedData($calendarData);
$q = $this->db->getQueryBuilder();
@@ -1169,7 +1169,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return string
*/
- public function updateCalendarObject($calendarId, $objectUri, $calendarData, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function updateCalendarObject($calendarId, $objectUri, $calendarData, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$extraData = $this->getDenormalizedData($calendarData);
$query = $this->db->getQueryBuilder();
$query->update('calendarobjects')
@@ -1252,7 +1252,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return void
*/
- public function deleteCalendarObject($calendarId, $objectUri, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function deleteCalendarObject($calendarId, $objectUri, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$data = $this->getCalendarObject($calendarId, $objectUri, $calendarType);
if (is_array($data)) {
if ($calendarType === self::CALENDAR_TYPE_CALENDAR) {
@@ -1345,7 +1345,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function calendarQuery($calendarId, array $filters, $calendarType=self::CALENDAR_TYPE_CALENDAR):array {
+ public function calendarQuery($calendarId, array $filters, $calendarType = self::CALENDAR_TYPE_CALENDAR):array {
$componentType = null;
$requirePostFilter = true;
$timeRange = null;
@@ -1439,7 +1439,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param integer|null $offset
* @return array
*/
- public function calendarSearch($principalUri, array $filters, $limit=null, $offset=null) {
+ public function calendarSearch($principalUri, array $filters, $limit = null, $offset = null) {
$calendars = $this->getCalendarsForUser($principalUri);
$ownCalendars = [];
$sharedCalendars = [];
@@ -1932,7 +1932,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function getChangesForCalendar($calendarId, $syncToken, $syncLevel, $limit = null, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
// Current synctoken
$stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*calendars` WHERE `id` = ?');
$stmt->execute([ $calendarId ]);
@@ -1944,15 +1944,15 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$result = [
'syncToken' => $currentToken,
- 'added' => [],
- 'modified' => [],
- 'deleted' => [],
+ 'added' => [],
+ 'modified' => [],
+ 'deleted' => [],
];
if ($syncToken) {
$query = "SELECT `uri`, `operation` FROM `*PREFIX*calendarchanges` WHERE `synctoken` >= ? AND `synctoken` < ? AND `calendarid` = ? AND `calendartype` = ? ORDER BY `synctoken`";
- if ($limit>0) {
- $query.= " LIMIT " . (int)$limit;
+ if ($limit > 0) {
+ $query .= " LIMIT " . (int)$limit;
}
// Fetching all changes
@@ -2037,22 +2037,22 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
->from('calendarsubscriptions')
->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri)))
->orderBy('calendarorder', 'asc');
- $stmt =$query->execute();
+ $stmt = $query->execute();
$subscriptions = [];
while ($row = $stmt->fetch(\PDO::FETCH_ASSOC)) {
$subscription = [
- 'id' => $row['id'],
- 'uri' => $row['uri'],
+ 'id' => $row['id'],
+ 'uri' => $row['uri'],
'principaluri' => $row['principaluri'],
- 'source' => $row['source'],
+ 'source' => $row['source'],
'lastmodified' => $row['lastmodified'],
'{' . Plugin::NS_CALDAV . '}supported-calendar-component-set' => new SupportedCalendarComponentSet(['VTODO', 'VEVENT']),
'{http://sabredav.org/ns}sync-token' => $row['synctoken']?$row['synctoken']:'0',
];
- foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
+ foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
if (!is_null($row[$dbName])) {
$subscription[$xmlName] = $row[$dbName];
}
@@ -2082,14 +2082,14 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$values = [
'principaluri' => $principalUri,
- 'uri' => $uri,
- 'source' => $properties['{http://calendarserver.org/ns/}source']->getHref(),
+ 'uri' => $uri,
+ 'source' => $properties['{http://calendarserver.org/ns/}source']->getHref(),
'lastmodified' => time(),
];
$propertiesBoolean = ['striptodos', 'stripalarms', 'stripattachments'];
- foreach ($this->subscriptionPropertyMap as $xmlName=>$dbName) {
+ foreach ($this->subscriptionPropertyMap as $xmlName => $dbName) {
if (array_key_exists($xmlName, $properties)) {
$values[$dbName] = $properties[$xmlName];
if (in_array($dbName, $propertiesBoolean)) {
@@ -2147,7 +2147,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$propPatch->handle($supportedProperties, function ($mutations) use ($subscriptionId) {
$newValues = [];
- foreach ($mutations as $propertyName=>$propertyValue) {
+ foreach ($mutations as $propertyName => $propertyValue) {
if ($propertyName === '{http://calendarserver.org/ns/}source') {
$newValues['source'] = $propertyValue->getHref();
} else {
@@ -2159,7 +2159,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$query = $this->db->getQueryBuilder();
$query->update('calendarsubscriptions')
->set('lastmodified', $query->createNamedParameter(time()));
- foreach ($newValues as $fieldName=>$value) {
+ foreach ($newValues as $fieldName => $value) {
$query->set($fieldName, $query->createNamedParameter($value));
}
$query->where($query->expr()->eq('id', $query->createNamedParameter($subscriptionId)))
@@ -2252,11 +2252,11 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
}
return [
- 'uri' => $row['uri'],
+ 'uri' => $row['uri'],
'calendardata' => $row['calendardata'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
];
}
@@ -2282,10 +2282,10 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
foreach ($stmt->fetchAll(\PDO::FETCH_ASSOC) as $row) {
$result[] = [
'calendardata' => $row['calendardata'],
- 'uri' => $row['uri'],
+ 'uri' => $row['uri'],
'lastmodified' => $row['lastmodified'],
- 'etag' => '"' . $row['etag'] . '"',
- 'size' => (int)$row['size'],
+ 'etag' => '"' . $row['etag'] . '"',
+ 'size' => (int)$row['size'],
];
}
@@ -2338,7 +2338,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return void
*/
- protected function addChange($calendarId, $objectUri, $operation, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ protected function addChange($calendarId, $objectUri, $operation, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$table = $calendarType === self::CALENDAR_TYPE_CALENDAR ? 'calendars': 'calendarsubscriptions';
$query = $this->db->getQueryBuilder();
@@ -2388,7 +2388,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
$uid = null;
$classification = self::CLASSIFICATION_PUBLIC;
foreach ($vObject->getComponents() as $component) {
- if ($component->name!=='VTIMEZONE') {
+ if ($component->name !== 'VTIMEZONE') {
$componentType = $component->name;
$uid = (string)$component->UID;
break;
@@ -2446,7 +2446,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'size' => strlen($calendarData),
'componentType' => $componentType,
'firstOccurence' => is_null($firstOccurrence) ? null : max(0, $firstOccurrence),
- 'lastOccurence' => $lastOccurrence,
+ 'lastOccurence' => $lastOccurrence,
'uid' => $uid,
'classification' => $classification
];
@@ -2493,7 +2493,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param int $calendarType
* @return array
*/
- public function getShares($resourceId, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function getShares($resourceId, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
return $this->calendarSharingBackend->getShares($resourceId);
}
@@ -2574,7 +2574,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
* @param string $calendarData
* @param int $calendarType
*/
- public function updateProperties($calendarId, $objectUri, $calendarData, $calendarType=self::CALENDAR_TYPE_CALENDAR) {
+ public function updateProperties($calendarId, $objectUri, $calendarData, $calendarType = self::CALENDAR_TYPE_CALENDAR) {
$objectId = $this->getCalendarObjectId($calendarId, $objectUri, $calendarType);
try {
diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php
index 913401b624d..abddf2b706f 100644
--- a/apps/dav/lib/CalDAV/Calendar.php
+++ b/apps/dav/lib/CalDAV/Calendar.php
@@ -138,7 +138,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
* @return array
*/
public function getACL() {
- $acl = [
+ $acl = [
[
'privilege' => '{DAV:}read',
'principal' => $this->getOwner(),
@@ -191,7 +191,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable {
}
if ($this->getOwner() !== parent::getOwner()) {
- $acl[] = [
+ $acl[] = [
'privilege' => '{DAV:}read',
'principal' => parent::getOwner(),
'protected' => true,
diff --git a/apps/dav/lib/CalDAV/CalendarHome.php b/apps/dav/lib/CalDAV/CalendarHome.php
index 90f8f294212..1a00ad94af5 100644
--- a/apps/dav/lib/CalDAV/CalendarHome.php
+++ b/apps/dav/lib/CalDAV/CalendarHome.php
@@ -52,7 +52,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome {
private $pluginManager;
/** @var bool */
- private $returnCachedSubscriptions=false;
+ private $returnCachedSubscriptions = false;
public function __construct(BackendInterface $caldavBackend, $principalInfo) {
parent::__construct($caldavBackend, $principalInfo);
@@ -183,7 +183,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome {
* @param integer|null $limit
* @param integer|null $offset
*/
- public function calendarSearch(array $filters, $limit=null, $offset=null) {
+ public function calendarSearch(array $filters, $limit = null, $offset = null) {
$principalUri = $this->principalInfo['uri'];
return $this->caldavBackend->calendarSearch($principalUri, $filters, $limit, $offset);
}
diff --git a/apps/dav/lib/CalDAV/CalendarImpl.php b/apps/dav/lib/CalDAV/CalendarImpl.php
index b938a8999a6..2f4aa858a32 100644
--- a/apps/dav/lib/CalDAV/CalendarImpl.php
+++ b/apps/dav/lib/CalDAV/CalendarImpl.php
@@ -89,7 +89,7 @@ class CalendarImpl implements ICalendar {
* @return array an array of events/journals/todos which are arrays of key-value-pairs
* @since 13.0.0
*/
- public function search($pattern, array $searchProperties=[], array $options=[], $limit=null, $offset=null) {
+ public function search($pattern, array $searchProperties = [], array $options = [], $limit = null, $offset = null) {
return $this->backend->search($this->calendarInfo, $pattern,
$searchProperties, $options, $limit, $offset);
}
diff --git a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
index e29d492538d..a422b19a46b 100644
--- a/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
+++ b/apps/dav/lib/CalDAV/Proxy/ProxyMapper.php
@@ -37,7 +37,7 @@ use OCP\IDBConnection;
* @package OCA\DAV\CalDAV\Proxy
*/
class ProxyMapper extends QBMapper {
- public const PERMISSION_READ = 1;
+ public const PERMISSION_READ = 1;
public const PERMISSION_WRITE = 2;
/**
diff --git a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
index 23fd60a290d..87fdc68baf0 100644
--- a/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/INotificationProvider.php
@@ -47,5 +47,5 @@ interface INotificationProvider {
*/
public function send(VEvent $vevent,
string $calendarDisplayName,
- array $users=[]): void;
+ array $users = []): void;
}
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
index 9a6c3fa6aeb..5b46271f453 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php
@@ -95,7 +95,7 @@ abstract class AbstractProvider implements INotificationProvider {
*/
abstract public function send(VEvent $vevent,
string $calendarDisplayName,
- array $users=[]): void;
+ array $users = []): void;
/**
* @return string
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
index ef824821e31..754cdc8c616 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php
@@ -83,7 +83,7 @@ class EmailProvider extends AbstractProvider {
*/
public function send(VEvent $vevent,
string $calendarDisplayName,
- array $users=[]):void {
+ array $users = []):void {
$fallbackLanguage = $this->getFallbackLanguage();
$emailAddressesOfSharees = $this->getEMailAddressesOfAllUsersWithWriteAccessToCalendar($users);
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
index 769f9927e47..6db3ca563ae 100644
--- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
+++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/PushProvider.php
@@ -86,8 +86,8 @@ class PushProvider extends AbstractProvider {
* @throws \Exception
*/
public function send(VEvent $vevent,
- string $calendarDisplayName=null,
- array $users=[]):void {
+ string $calendarDisplayName = null,
+ array $users = []):void {
if ($this->config->getAppValue('dav', 'sendEventRemindersPush', 'no') !== 'yes') {
return;
}
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
index 76b4765a4fd..688b4ce6107 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -330,10 +330,10 @@ class ReminderService {
*/
private function getRemindersForVAlarm(VAlarm $valarm,
array $objectData,
- string $eventHash=null,
- string $alarmHash=null,
- bool $isRecurring=false,
- bool $isRecurrenceException=false):array {
+ string $eventHash = null,
+ string $alarmHash = null,
+ bool $isRecurring = false,
+ bool $isRecurrenceException = false):array {
if ($eventHash === null) {
$eventHash = $this->getEventHash($valarm->parent);
}
diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
index d2309232df7..481c576081e 100644
--- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
+++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php
@@ -435,7 +435,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface {
* @param String[] $metadata
* @return Array
*/
- private function rowToPrincipal(array $row, array $metadata=[]):array {
+ private function rowToPrincipal(array $row, array $metadata = []):array {
return array_merge([
'uri' => $this->principalPrefix . '/' . $row['backend_id'] . '-' . $row['resource_id'],
'{DAV:}displayname' => $row['displayname'],
diff --git a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
index e360273383e..b88364aaa9d 100644
--- a/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php
@@ -293,7 +293,7 @@ class IMipPlugin extends SabreIMipPlugin {
$failed = $this->mailer->send($message);
$iTipMessage->scheduleStatus = '1.1; Scheduling message is sent via iMip';
if ($failed) {
- $this->logger->error('Unable to deliver message to {failed}', ['app' => 'dav', 'failed' => implode(', ', $failed)]);
+ $this->logger->error('Unable to deliver message to {failed}', ['app' => 'dav', 'failed' => implode(', ', $failed)]);
$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
}
} catch (\Exception $ex) {
diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php
index aa597d0cab8..9ccabdc86fd 100644
--- a/apps/dav/lib/CalDAV/Schedule/Plugin.php
+++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php
@@ -208,7 +208,7 @@ class Plugin extends \Sabre\CalDAV\Schedule\Plugin {
}
$dtstart = $vevent->DTSTART;
- $dtend = $this->getDTEndFromVEvent($vevent);
+ $dtend = $this->getDTEndFromVEvent($vevent);
$uid = $vevent->UID->getValue();
$sequence = isset($vevent->SEQUENCE) ? $vevent->SEQUENCE->getValue() : 0;
$recurrenceId = isset($vevent->{'RECURRENCE-ID'}) ? $vevent->{'RECURRENCE-ID'}->serialize() : '';
@@ -455,20 +455,20 @@ EOF;
'start' => $start,
'end' => $end,
],
- 'comp-filters' => [],
- 'prop-filters' => [],
+ 'comp-filters' => [],
+ 'prop-filters' => [],
],
[
'name' => 'VEVENT',
'is-not-defined' => false,
'time-range' => null,
- 'comp-filters' => [],
- 'prop-filters' => [
+ 'comp-filters' => [],
+ 'prop-filters' => [
[
- 'name' => 'UID',
+ 'name' => 'UID',
'is-not-defined' => false,
- 'time-range' => null,
- 'text-match' => [
+ 'time-range' => null,
+ 'text-match' => [
'value' => $ignoreUID,
'negate-condition' => true,
'collation' => 'i;octet',
@@ -549,7 +549,7 @@ EOF;
* @return string
*/
private function stripOffMailTo(string $email): string {
- if (stripos($email, 'mailto:') === 0) {
+ if (stripos($email, 'mailto:') === 0) {
return substr($email, 7);
}
diff --git a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php
index 14e9c764678..d9215a5a73c 100644
--- a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php
+++ b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php
@@ -87,20 +87,20 @@ class CalendarSearchReport implements XmlDeserializable {
*/
public static function xmlDeserialize(Reader $reader) {
$elems = $reader->parseInnerTree([
- '{http://nextcloud.com/ns}comp-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter',
- '{http://nextcloud.com/ns}prop-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter',
+ '{http://nextcloud.com/ns}comp-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\CompFilter',
+ '{http://nextcloud.com/ns}prop-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\PropFilter',
'{http://nextcloud.com/ns}param-filter' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\ParamFilter',
- '{http://nextcloud.com/ns}search-term' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter',
- '{http://nextcloud.com/ns}limit' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter',
- '{http://nextcloud.com/ns}offset' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter',
- '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
+ '{http://nextcloud.com/ns}search-term' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\SearchTermFilter',
+ '{http://nextcloud.com/ns}limit' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\LimitFilter',
+ '{http://nextcloud.com/ns}offset' => 'OCA\\DAV\\CalDAV\\Search\\Xml\\Filter\\OffsetFilter',
+ '{DAV:}prop' => 'Sabre\\Xml\\Element\\KeyValue',
]);
$newProps = [
- 'filters' => [],
+ 'filters' => [],
'properties' => [],
- 'limit' => null,
- 'offset' => null
+ 'limit' => null,
+ 'offset' => null
];
if (!is_array($elems)) {
diff --git a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
index 4b50fa5b5b9..ac592797d3d 100644
--- a/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
+++ b/apps/dav/lib/CalDAV/WebcalCaching/Plugin.php
@@ -49,7 +49,7 @@ class Plugin extends ServerPlugin {
/**
* @var bool
*/
- private $enabled=false;
+ private $enabled = false;
/**
* @var Server