diff options
Diffstat (limited to 'apps/dav/lib')
33 files changed, 157 insertions, 157 deletions
diff --git a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php index 60eae25fdcc..33f2a14b7fd 100644 --- a/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php +++ b/apps/dav/lib/BackgroundJob/CleanupDirectLinksJob.php @@ -38,7 +38,7 @@ class CleanupDirectLinksJob extends TimedJob { private $mapper; public function __construct(ITimeFactory $timeFactory, DirectMapper $mapper) { - $this->setInterval(60*60*24); + $this->setInterval(60 * 60 * 24); $this->timeFactory = $timeFactory; $this->mapper = $mapper; @@ -46,6 +46,6 @@ class CleanupDirectLinksJob extends TimedJob { protected function run($argument) { // Delete all shares expired 24 hours ago - $this->mapper->deleteExpired($this->timeFactory->getTime() - 60*60*24); + $this->mapper->deleteExpired($this->timeFactory->getTime() - 60 * 60 * 24); } } diff --git a/apps/dav/lib/BackgroundJob/UploadCleanup.php b/apps/dav/lib/BackgroundJob/UploadCleanup.php index b1cdd6fa0c4..104faf12b65 100644 --- a/apps/dav/lib/BackgroundJob/UploadCleanup.php +++ b/apps/dav/lib/BackgroundJob/UploadCleanup.php @@ -51,7 +51,7 @@ class UploadCleanup extends TimedJob { $this->jobList = $jobList; // Run once a day - $this->setInterval(60*60*24); + $this->setInterval(60 * 60 * 24); } protected function run($argument) { @@ -65,7 +65,7 @@ class UploadCleanup extends TimedJob { $uploads = $userRoot->get('uploads'); /** @var Folder $uploadFolder */ $uploadFolder = $uploads->get($folder); - } catch (NotFoundException|NoUserException $e) { + } catch (NotFoundException | NoUserException $e) { $this->jobList->remove(self::class, $argument); return; } 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 diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index 50aa9d219c8..0078dece854 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -105,7 +105,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { } public function getACL() { - $acl = [ + $acl = [ [ 'privilege' => '{DAV:}read', 'principal' => $this->getOwner(), @@ -130,7 +130,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { } if ($this->getOwner() !== parent::getOwner()) { - $acl[] = [ + $acl[] = [ 'privilege' => '{DAV:}read', 'principal' => parent::getOwner(), 'protected' => true, diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 14ade3f16e2..b9aecbd1c36 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -1044,7 +1044,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { $query2 = $this->db->getQueryBuilder(); - $addressBookOr = $query2->expr()->orX(); + $addressBookOr = $query2->expr()->orX(); foreach ($addressBookIds as $addressBookId) { $addressBookOr->add($query2->expr()->eq('cp.addressbookid', $query2->createNamedParameter($addressBookId))); } diff --git a/apps/dav/lib/CardDAV/Converter.php b/apps/dav/lib/CardDAV/Converter.php index 8dea77bd0a6..dd7ceb77c55 100644 --- a/apps/dav/lib/CardDAV/Converter.php +++ b/apps/dav/lib/CardDAV/Converter.php @@ -124,9 +124,9 @@ class Converter { $elements = explode(' ', $fullName); $result = ['', '', '', '', '']; if (count($elements) > 2) { - $result[0] = implode(' ', array_slice($elements, count($elements)-1)); + $result[0] = implode(' ', array_slice($elements, count($elements) - 1)); $result[1] = $elements[0]; - $result[2] = implode(' ', array_slice($elements, 1, count($elements)-2)); + $result[2] = implode(' ', array_slice($elements, 1, count($elements) - 2)); } elseif (count($elements) === 2) { $result[0] = $elements[1]; $result[1] = $elements[0]; diff --git a/apps/dav/lib/CardDAV/HasPhotoPlugin.php b/apps/dav/lib/CardDAV/HasPhotoPlugin.php index d54b8581ad9..a77a75c6cc6 100644 --- a/apps/dav/lib/CardDAV/HasPhotoPlugin.php +++ b/apps/dav/lib/CardDAV/HasPhotoPlugin.php @@ -99,7 +99,7 @@ class HasPhotoPlugin extends ServerPlugin { */ public function getPluginInfo() { return [ - 'name' => $this->getPluginName(), + 'name' => $this->getPluginName(), 'description' => 'Return a boolean stating if the vcard have a photo property set or not.' ]; } diff --git a/apps/dav/lib/CardDAV/MultiGetExportPlugin.php b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php index bb911ffc033..e2dbb049bf0 100644 --- a/apps/dav/lib/CardDAV/MultiGetExportPlugin.php +++ b/apps/dav/lib/CardDAV/MultiGetExportPlugin.php @@ -70,7 +70,7 @@ class MultiGetExportPlugin extends DAV\ServerPlugin { // Get the xml response $responseBody = $response->getBodyAsString(); - $responseXml = $this->server->xml->parse($responseBody); + $responseXml = $this->server->xml->parse($responseBody); // Reduce the vcards into one string $output = array_reduce($responseXml->getResponses(), function ($vcf, $card) { @@ -114,7 +114,7 @@ class MultiGetExportPlugin extends DAV\ServerPlugin { */ public function getPluginInfo() { return [ - 'name' => $this->getPluginName(), + 'name' => $this->getPluginName(), 'description' => 'Intercept a multi-get request and return a single vcf file instead.' ]; } diff --git a/apps/dav/lib/CardDAV/PhotoCache.php b/apps/dav/lib/CardDAV/PhotoCache.php index 620a88dcfb8..3d88eef5789 100644 --- a/apps/dav/lib/CardDAV/PhotoCache.php +++ b/apps/dav/lib/CardDAV/PhotoCache.php @@ -240,7 +240,7 @@ class PhotoCache { return [ 'Content-Type' => $type, - 'body' => $val + 'body' => $val ]; } catch (\Exception $e) { $this->logger->logException($e, [ diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php index f0552dcdc8e..4a0cfe78028 100644 --- a/apps/dav/lib/Comments/CommentNode.php +++ b/apps/dav/lib/Comments/CommentNode.php @@ -256,7 +256,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { $result[self::PROPERTY_NAME_MENTIONS] = $this->composeMentionsPropertyValue(); $unread = null; - $user = $this->userSession->getUser(); + $user = $this->userSession->getUser(); if (!is_null($user)) { $readUntil = $this->commentsManager->getReadMark( $this->comment->getObjectType(), @@ -295,8 +295,8 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { return [ self::PROPERTY_NAME_MENTION => [ - self::PROPERTY_NAME_MENTION_TYPE => $mention['type'], - self::PROPERTY_NAME_MENTION_ID => $mention['id'], + self::PROPERTY_NAME_MENTION_TYPE => $mention['type'], + self::PROPERTY_NAME_MENTION_ID => $mention['id'], self::PROPERTY_NAME_MENTION_DISPLAYNAME => $displayName, ] ]; diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php index ec15d497276..058ed968f1f 100644 --- a/apps/dav/lib/Comments/CommentsPlugin.php +++ b/apps/dav/lib/Comments/CommentsPlugin.php @@ -48,9 +48,9 @@ class CommentsPlugin extends ServerPlugin { // namespace public const NS_OWNCLOUD = 'http://owncloud.org/ns'; - public const REPORT_NAME = '{http://owncloud.org/ns}filter-comments'; - public const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit'; - public const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset'; + public const REPORT_NAME = '{http://owncloud.org/ns}filter-comments'; + public const REPORT_PARAM_LIMIT = '{http://owncloud.org/ns}limit'; + public const REPORT_PARAM_OFFSET = '{http://owncloud.org/ns}offset'; public const REPORT_PARAM_TIMESTAMP = '{http://owncloud.org/ns}datetime'; /** @var ICommentsManager */ diff --git a/apps/dav/lib/Comments/EntityCollection.php b/apps/dav/lib/Comments/EntityCollection.php index 106d6f99432..b68e3b9cf46 100644 --- a/apps/dav/lib/Comments/EntityCollection.php +++ b/apps/dav/lib/Comments/EntityCollection.php @@ -42,7 +42,7 @@ use Sabre\DAV\PropPatch; * @package OCA\DAV\Comments */ class EntityCollection extends RootCollection implements IProperties { - public const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker'; + public const PROPERTY_NAME_READ_MARKER = '{http://owncloud.org/ns}readMarker'; /** @var string */ protected $id; diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php index 22e418ee561..d5eb7062dd1 100644 --- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php @@ -32,8 +32,8 @@ use Sabre\DAV\PropFind; use Sabre\DAV\ServerPlugin; class CommentPropertiesPlugin extends ServerPlugin { - public const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href'; - public const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count'; + public const PROPERTY_NAME_HREF = '{http://owncloud.org/ns}comments-href'; + public const PROPERTY_NAME_COUNT = '{http://owncloud.org/ns}comments-count'; public const PROPERTY_NAME_UNREAD = '{http://owncloud.org/ns}comments-unread'; /** @var \Sabre\DAV\Server */ @@ -131,7 +131,7 @@ class CommentPropertiesPlugin extends ServerPlugin { * @return mixed|string */ public function getCommentsLink(Node $node) { - $href = $this->server->getBaseUri(); + $href = $this->server->getBaseUri(); $entryPoint = strpos($href, '/remote.php/'); if ($entryPoint === false) { // in case we end up somewhere else, unexpectedly. diff --git a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php index 0e7db3f57ce..8721613fea4 100644 --- a/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesReportPlugin.php @@ -49,7 +49,7 @@ class FilesReportPlugin extends ServerPlugin { // namespace public const NS_OWNCLOUD = 'http://owncloud.org/ns'; - public const REPORT_NAME = '{http://owncloud.org/ns}filter-files'; + public const REPORT_NAME = '{http://owncloud.org/ns}filter-files'; public const SYSTEMTAG_PROPERTYNAME = '{http://owncloud.org/ns}systemtag'; public const CIRCLE_PROPERTYNAME = '{http://owncloud.org/ns}circle'; diff --git a/apps/dav/lib/Controller/InvitationResponseController.php b/apps/dav/lib/Controller/InvitationResponseController.php index eafbe6fbbd8..726ee1c498a 100644 --- a/apps/dav/lib/Controller/InvitationResponseController.php +++ b/apps/dav/lib/Controller/InvitationResponseController.php @@ -192,8 +192,8 @@ class InvitationResponseController extends Controller { * @param string|null $comment * @return Message */ - private function buildITipResponse(array $row, string $partStat, int $guests=null, - string $comment=null):Message { + private function buildITipResponse(array $row, string $partStat, int $guests = null, + string $comment = null):Message { $iTipMessage = new Message(); $iTipMessage->uid = $row['uid']; $iTipMessage->component = 'VEVENT'; diff --git a/apps/dav/lib/DAV/Sharing/Backend.php b/apps/dav/lib/DAV/Sharing/Backend.php index 2f8fb0c3107..979eb391354 100644 --- a/apps/dav/lib/DAV/Sharing/Backend.php +++ b/apps/dav/lib/DAV/Sharing/Backend.php @@ -198,7 +198,7 @@ class Backend { $shares = []; while ($row = $result->fetch()) { $p = $this->principalBackend->getPrincipalByPath($row['principaluri']); - $shares[]= [ + $shares[] = [ 'href' => "principal:${row['principaluri']}", 'commonName' => isset($p['{DAV:}displayname']) ? $p['{DAV:}displayname'] : '', 'status' => 1, diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php index b364639f69f..c736824d857 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php +++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php @@ -46,7 +46,7 @@ class ShareRequest implements XmlDeserializable { public static function xmlDeserialize(Reader $reader) { $elements = $reader->parseInnerTree([ - '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', + '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', ]); @@ -63,10 +63,10 @@ class ShareRequest implements XmlDeserializable { $commonName = '{' . Plugin::NS_OWNCLOUD . '}common-name'; $set[] = [ - 'href' => $sharee['{DAV:}href'], + 'href' => $sharee['{DAV:}href'], 'commonName' => isset($sharee[$commonName]) ? $sharee[$commonName] : null, - 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, - 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), + 'summary' => isset($sharee[$sumElem]) ? $sharee[$sumElem] : null, + 'readOnly' => !array_key_exists('{' . Plugin::NS_OWNCLOUD . '}read-write', $sharee), ]; break; diff --git a/apps/dav/lib/Search/TasksSearchProvider.php b/apps/dav/lib/Search/TasksSearchProvider.php index 23ccdab323f..26fb659aa18 100644 --- a/apps/dav/lib/Search/TasksSearchProvider.php +++ b/apps/dav/lib/Search/TasksSearchProvider.php @@ -162,7 +162,7 @@ class TasksSearchProvider extends ACalendarSearchProvider { $formattedDate = $this->l10n->l('date', $dueDateTime, ['width' => 'medium']); if ($taskComponent->DUE->hasTime()) { - $formattedTime = $this->l10n->l('time', $dueDateTime, ['width' => 'short']); + $formattedTime = $this->l10n->l('time', $dueDateTime, ['width' => 'short']); return $this->l10n->t('Due on %s by %s', [$formattedDate, $formattedTime]); } |