diff options
Diffstat (limited to 'apps/dav/lib')
65 files changed, 203 insertions, 203 deletions
diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index dd3cb048483..b620b20d4d5 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -253,7 +253,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $principalUri * @return array */ - function getCalendarsForUser($principalUri) { + public function getCalendarsForUser($principalUri) { $principalUriOriginal = $principalUri; $principalUri = $this->convertPrincipal($principalUri, true); $fields = array_values($this->propertyMap); @@ -722,7 +722,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @return int * @suppress SqlInjectionChecker */ - function createCalendar($principalUri, $calendarUri, array $properties) { + public function createCalendar($principalUri, $calendarUri, array $properties) { $values = [ 'principaluri' => $this->convertPrincipal($principalUri, true), 'uri' => $calendarUri, @@ -790,7 +790,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param PropPatch $propPatch * @return void */ - function updateCalendar($calendarId, PropPatch $propPatch) { + public function updateCalendar($calendarId, PropPatch $propPatch) { $supportedProperties = array_keys($this->propertyMap); $supportedProperties[] = '{' . Plugin::NS_CALDAV . '}schedule-calendar-transp'; @@ -840,7 +840,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param mixed $calendarId * @return void */ - function deleteCalendar($calendarId) { + public function deleteCalendar($calendarId) { $this->dispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::deleteCalendar', new GenericEvent( '\OCA\DAV\CalDAV\CalDavBackend::deleteCalendar', [ @@ -873,7 +873,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $principaluri * @return void */ - function deleteAllSharesByUser($principaluri) { + public function deleteAllSharesByUser($principaluri) { $this->calendarSharingBackend->deleteAllSharesByUser($principaluri); } @@ -1048,7 +1048,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param int $calendarType * @return string */ - 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(); @@ -1131,7 +1131,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param int $calendarType * @return string */ - 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') @@ -1207,7 +1207,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param int $calendarType * @return void */ - 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) { @@ -1688,7 +1688,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $uid * @return string|null */ - function getCalendarObjectByUID($principalUri, $uid) { + public function getCalendarObjectByUID($principalUri, $uid) { $query = $this->db->getQueryBuilder(); $query->selectAlias('c.uri', 'calendaruri')->selectAlias('co.uri', 'objecturi') ->from('calendarobjects', 'co') @@ -1763,7 +1763,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param int $calendarType * @return array */ - 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 ]); @@ -1854,7 +1854,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $principalUri * @return array */ - function getSubscriptionsForUser($principalUri) { + public function getSubscriptionsForUser($principalUri) { $fields = array_values($this->subscriptionPropertyMap); $fields[] = 'id'; $fields[] = 'uri'; @@ -1906,7 +1906,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param array $properties * @return mixed */ - function createSubscription($principalUri, $uri, array $properties) { + public function createSubscription($principalUri, $uri, array $properties) { if (!isset($properties['{http://calendarserver.org/ns/}source'])) { throw new Forbidden('The {http://calendarserver.org/ns/}source property is required when creating subscriptions'); } @@ -1969,7 +1969,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param PropPatch $propPatch * @return void */ - function updateSubscription($subscriptionId, PropPatch $propPatch) { + public function updateSubscription($subscriptionId, PropPatch $propPatch) { $supportedProperties = array_keys($this->subscriptionPropertyMap); $supportedProperties[] = '{http://calendarserver.org/ns/}source'; @@ -2015,7 +2015,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param mixed $subscriptionId * @return void */ - function deleteSubscription($subscriptionId) { + public function deleteSubscription($subscriptionId) { $this->dispatcher->dispatch('\OCA\DAV\CalDAV\CalDavBackend::deleteSubscription', new GenericEvent( '\OCA\DAV\CalDAV\CalDavBackend::deleteSubscription', [ @@ -2061,7 +2061,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $objectUri * @return array */ - function getSchedulingObject($principalUri, $objectUri) { + public function getSchedulingObject($principalUri, $objectUri) { $query = $this->db->getQueryBuilder(); $stmt = $query->select(['uri', 'calendardata', 'lastmodified', 'etag', 'size']) ->from('schedulingobjects') @@ -2095,7 +2095,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $principalUri * @return array */ - function getSchedulingObjects($principalUri) { + public function getSchedulingObjects($principalUri) { $query = $this->db->getQueryBuilder(); $stmt = $query->select(['uri', 'calendardata', 'lastmodified', 'etag', 'size']) ->from('schedulingobjects') @@ -2123,7 +2123,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $objectUri * @return void */ - function deleteSchedulingObject($principalUri, $objectUri) { + public function deleteSchedulingObject($principalUri, $objectUri) { $query = $this->db->getQueryBuilder(); $query->delete('schedulingobjects') ->where($query->expr()->eq('principaluri', $query->createNamedParameter($principalUri))) @@ -2139,7 +2139,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription * @param string $objectData * @return void */ - function createSchedulingObject($principalUri, $objectUri, $objectData) { + public function createSchedulingObject($principalUri, $objectUri, $objectData) { $query = $this->db->getQueryBuilder(); $query->insert('schedulingobjects') ->values([ diff --git a/apps/dav/lib/CalDAV/CalendarHome.php b/apps/dav/lib/CalDAV/CalendarHome.php index ce29ed12db6..adc016192ac 100644 --- a/apps/dav/lib/CalDAV/CalendarHome.php +++ b/apps/dav/lib/CalDAV/CalendarHome.php @@ -73,7 +73,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome { /** * @inheritdoc */ - function createExtendedCollection($name, MkCol $mkCol) { + public function createExtendedCollection($name, MkCol $mkCol) { $reservedNames = [BirthdayService::BIRTHDAY_CALENDAR_URI]; if (\in_array($name, $reservedNames, true) || ExternalCalendar::doesViolateReservedName($name)) { @@ -86,7 +86,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome { /** * @inheritdoc */ - function getChildren() { + public function getChildren() { $calendars = $this->caldavBackend->getCalendarsForUser($this->principalInfo['uri']); $objects = []; foreach ($calendars as $calendar) { @@ -128,7 +128,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome { /** * @inheritdoc */ - function getChild($name) { + public function getChild($name) { // Special nodes if ($name === 'inbox' && $this->caldavBackend instanceof SchedulingSupport) { return new Inbox($this->caldavBackend, $this->principalInfo['uri']); @@ -182,7 +182,7 @@ class CalendarHome extends \Sabre\CalDAV\CalendarHome { * @param integer|null $limit * @param integer|null $offset */ - 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/CalendarObject.php b/apps/dav/lib/CalDAV/CalendarObject.php index 8bdde256628..df77a2b6498 100644 --- a/apps/dav/lib/CalDAV/CalendarObject.php +++ b/apps/dav/lib/CalDAV/CalendarObject.php @@ -59,7 +59,7 @@ class CalendarObject extends \Sabre\CalDAV\CalendarObject { /** * @inheritdoc */ - function get() { + public function get() { $data = parent::get(); if (!$this->isShared()) { diff --git a/apps/dav/lib/CalDAV/CalendarRoot.php b/apps/dav/lib/CalDAV/CalendarRoot.php index ace8482d9c7..4dd3e9986f0 100644 --- a/apps/dav/lib/CalDAV/CalendarRoot.php +++ b/apps/dav/lib/CalDAV/CalendarRoot.php @@ -26,11 +26,11 @@ namespace OCA\DAV\CalDAV; class CalendarRoot extends \Sabre\CalDAV\CalendarRoot { - function getChildForPrincipal(array $principal) { + public function getChildForPrincipal(array $principal) { return new CalendarHome($this->caldavBackend, $principal); } - function getName() { + public function getName() { if ($this->principalPrefix === 'principals/calendar-resources' || $this->principalPrefix === 'principals/calendar-rooms') { $parts = explode('/', $this->principalPrefix); diff --git a/apps/dav/lib/CalDAV/Outbox.php b/apps/dav/lib/CalDAV/Outbox.php index 87af86d06dd..468a6e54268 100644 --- a/apps/dav/lib/CalDAV/Outbox.php +++ b/apps/dav/lib/CalDAV/Outbox.php @@ -63,7 +63,7 @@ class Outbox extends \Sabre\CalDAV\Schedule\Outbox { * * @return array */ - function getACL() { + public function getACL() { // getACL is called so frequently that we cache the config result if ($this->disableFreeBusy === null) { $this->disableFreeBusy = ($this->config->getAppValue('dav', 'disableFreeBusy', 'no') === 'yes'); diff --git a/apps/dav/lib/CalDAV/Plugin.php b/apps/dav/lib/CalDAV/Plugin.php index 6d88244bbf1..c298a3f5ab6 100644 --- a/apps/dav/lib/CalDAV/Plugin.php +++ b/apps/dav/lib/CalDAV/Plugin.php @@ -37,7 +37,7 @@ class Plugin extends \Sabre\CalDAV\Plugin { * @param string $principalUrl * @return string|null */ - function getCalendarHomeForPrincipal($principalUrl) { + public function getCalendarHomeForPrincipal($principalUrl) { if (strrpos($principalUrl, 'principals/users', -strlen($principalUrl)) !== false) { list(, $principalId) = \Sabre\Uri\split($principalUrl); return self::CALENDAR_ROOT . '/' . $principalId; diff --git a/apps/dav/lib/CalDAV/Principal/Collection.php b/apps/dav/lib/CalDAV/Principal/Collection.php index 6e7e20223c8..23868172ddf 100644 --- a/apps/dav/lib/CalDAV/Principal/Collection.php +++ b/apps/dav/lib/CalDAV/Principal/Collection.php @@ -36,7 +36,7 @@ class Collection extends \Sabre\CalDAV\Principal\Collection { * @param array $principalInfo * @return User */ - function getChildForPrincipal(array $principalInfo) { + public function getChildForPrincipal(array $principalInfo) { return new User($this->principalBackend, $principalInfo); } } diff --git a/apps/dav/lib/CalDAV/Principal/User.php b/apps/dav/lib/CalDAV/Principal/User.php index f10773769ca..3507ca63829 100644 --- a/apps/dav/lib/CalDAV/Principal/User.php +++ b/apps/dav/lib/CalDAV/Principal/User.php @@ -42,7 +42,7 @@ class User extends \Sabre\CalDAV\Principal\User { * * @return array */ - function getACL() { + public function getACL() { $acl = parent::getACL(); $acl[] = [ 'privilege' => '{DAV:}read', diff --git a/apps/dav/lib/CalDAV/PublicCalendarRoot.php b/apps/dav/lib/CalDAV/PublicCalendarRoot.php index a79fffa598a..3dd7cfcc7ca 100644 --- a/apps/dav/lib/CalDAV/PublicCalendarRoot.php +++ b/apps/dav/lib/CalDAV/PublicCalendarRoot.php @@ -48,7 +48,7 @@ class PublicCalendarRoot extends Collection { * @param IL10N $l10n * @param IConfig $config */ - function __construct(CalDavBackend $caldavBackend, IL10N $l10n, + public function __construct(CalDavBackend $caldavBackend, IL10N $l10n, IConfig $config) { $this->caldavBackend = $caldavBackend; $this->l10n = $l10n; @@ -58,14 +58,14 @@ class PublicCalendarRoot extends Collection { /** * @inheritdoc */ - function getName() { + public function getName() { return 'public-calendars'; } /** * @inheritdoc */ - function getChild($name) { + public function getChild($name) { $calendar = $this->caldavBackend->getPublicCalendar($name); return new PublicCalendar($this->caldavBackend, $calendar, $this->l10n, $this->config); } @@ -73,7 +73,7 @@ class PublicCalendarRoot extends Collection { /** * @inheritdoc */ - function getChildren() { + public function getChildren() { return []; } } diff --git a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php index 2a750c5a32b..4314e0dcdd1 100644 --- a/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php +++ b/apps/dav/lib/CalDAV/Publishing/Xml/Publisher.php @@ -43,7 +43,7 @@ class Publisher implements XmlSerializable { * @param string $publishUrl * @param boolean $isPublished */ - function __construct($publishUrl, $isPublished) { + public function __construct($publishUrl, $isPublished) { $this->publishUrl = $publishUrl; $this->isPublished = $isPublished; } @@ -51,7 +51,7 @@ class Publisher implements XmlSerializable { /** * @return string */ - function getValue() { + public function getValue() { return $this->publishUrl; } @@ -74,7 +74,7 @@ class Publisher implements XmlSerializable { * @param Writer $writer * @return void */ - function xmlSerialize(Writer $writer) { + public function xmlSerialize(Writer $writer) { if (!$this->isPublished) { // for pre-publish-url $writer->write($this->publishUrl); diff --git a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php index 2a28c9fc02c..a460c731387 100644 --- a/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php +++ b/apps/dav/lib/CalDAV/ResourceBooking/AbstractPrincipalBackend.php @@ -229,7 +229,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { * @param PropPatch $propPatch * @return int */ - function updatePrincipal($path, PropPatch $propPatch) { + public function updatePrincipal($path, PropPatch $propPatch) { return 0; } @@ -239,7 +239,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { * @param string $test * @return array */ - function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { + public function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { $results = []; if (\count($searchProperties) === 0) { return []; @@ -370,7 +370,7 @@ abstract class AbstractPrincipalBackend implements BackendInterface { * @param string $principalPrefix * @return null|string */ - function findByUri($uri, $principalPrefix) { + public function findByUri($uri, $principalPrefix) { $user = $this->userSession->getUser(); if (!$user) { return null; diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 7ad4a3904ed..3b2f0374b46 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -62,7 +62,7 @@ class Plugin extends \Sabre\CalDAV\Schedule\Plugin { * @param Server $server * @return void */ - function initialize(Server $server) { + public function initialize(Server $server) { parent::initialize($server); $server->on('propFind', [$this, 'propFindDefaultCalendarUrl'], 90); $server->on('afterWriteContent', [$this, 'dispatchSchedulingResponses']); @@ -78,7 +78,7 @@ class Plugin extends \Sabre\CalDAV\Schedule\Plugin { * @param INode $node * @return void */ - function propFind(PropFind $propFind, INode $node) { + public function propFind(PropFind $propFind, INode $node) { if ($node instanceof IPrincipal) { // overwrite Sabre/Dav's implementation $propFind->handle('{' . self::NS_CALDAV . '}calendar-user-type', function () use ($node) { @@ -259,7 +259,7 @@ EOF; * @param INode $node * @return void */ - function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) { + public function propFindDefaultCalendarUrl(PropFind $propFind, INode $node) { if ($node instanceof IPrincipal) { $propFind->handle('{' . self::NS_CALDAV . '}schedule-default-calendar-URL', function () use ($node) { /** @var \OCA\DAV\CalDAV\Plugin $caldavPlugin */ diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php index c1adb1a5b86..f9d05f09c68 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/CompFilter.php @@ -36,7 +36,7 @@ class CompFilter implements XmlDeserializable { * @throws BadRequest * @return string */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $att = $reader->parseAttributes(); $componentName = $att['name']; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php index 765f3377feb..2dc0ee8b7a1 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/LimitFilter.php @@ -37,7 +37,7 @@ class LimitFilter implements XmlDeserializable { * @throws BadRequest * @return int */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $value = $reader->parseInnerTree(); if (!is_int($value) && !is_string($value)) { throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}limit has illegal value'); diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php index ac282a0ca60..335ea0d7756 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/OffsetFilter.php @@ -37,7 +37,7 @@ class OffsetFilter implements XmlDeserializable { * @throws BadRequest * @return int */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $value = $reader->parseInnerTree(); if (!is_int($value) && !is_string($value)) { throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}offset has illegal value'); diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php index 10b065fc426..51d55c98b13 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/ParamFilter.php @@ -36,7 +36,7 @@ class ParamFilter implements XmlDeserializable { * @throws BadRequest * @return string */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $att = $reader->parseAttributes(); $property = $att['property']; $parameter = $att['name']; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php index fb3bf139bbf..4a0455e47f8 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/PropFilter.php @@ -36,7 +36,7 @@ class PropFilter implements XmlDeserializable { * @throws BadRequest * @return string */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $att = $reader->parseAttributes(); $componentName = $att['name']; diff --git a/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php b/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php index 71a4e85c21f..0b7bbcf3a22 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Filter/SearchTermFilter.php @@ -36,7 +36,7 @@ class SearchTermFilter implements XmlDeserializable { * @throws BadRequest * @return string */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $value = $reader->parseInnerTree(); if (!is_string($value)) { throw new BadRequest('The {' . SearchPlugin::NS_Nextcloud . '}search-term has illegal value'); diff --git a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php index f63366e2e19..2b23da5a38c 100644 --- a/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php +++ b/apps/dav/lib/CalDAV/Search/Xml/Request/CalendarSearchReport.php @@ -84,7 +84,7 @@ class CalendarSearchReport implements XmlDeserializable { * @param Reader $reader * @return mixed */ - static function xmlDeserialize(Reader $reader) { + 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', diff --git a/apps/dav/lib/CardDAV/AddressBookRoot.php b/apps/dav/lib/CardDAV/AddressBookRoot.php index 771e44b7d32..57fc6b71010 100644 --- a/apps/dav/lib/CardDAV/AddressBookRoot.php +++ b/apps/dav/lib/CardDAV/AddressBookRoot.php @@ -56,11 +56,11 @@ class AddressBookRoot extends \Sabre\CardDAV\AddressBookRoot { * * @return \Sabre\DAV\INode */ - function getChildForPrincipal(array $principal) { + public function getChildForPrincipal(array $principal) { return new UserAddressBooks($this->carddavBackend, $principal['uri'], $this->pluginManager); } - function getName() { + public function getName() { if ($this->principalPrefix === 'principals') { return parent::getName(); } diff --git a/apps/dav/lib/CardDAV/CardDavBackend.php b/apps/dav/lib/CardDAV/CardDavBackend.php index 47551c8f170..782bc4c0f58 100644 --- a/apps/dav/lib/CardDAV/CardDavBackend.php +++ b/apps/dav/lib/CardDAV/CardDavBackend.php @@ -143,7 +143,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param string $principalUri * @return array */ - function getAddressBooksForUser($principalUri) { + public function getAddressBooksForUser($principalUri) { $principalUriOriginal = $principalUri; $principalUri = $this->convertPrincipal($principalUri, true); $query = $this->db->getQueryBuilder(); @@ -353,7 +353,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param \Sabre\DAV\PropPatch $propPatch * @return void */ - function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) { + public function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch) { $supportedProperties = [ '{DAV:}displayname', '{' . Plugin::NS_CARDDAV . '}addressbook-description', @@ -398,7 +398,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @return int * @throws BadRequest */ - function createAddressBook($principalUri, $url, array $properties) { + public function createAddressBook($principalUri, $url, array $properties) { $values = [ 'displayname' => null, 'description' => null, @@ -447,7 +447,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param mixed $addressBookId * @return void */ - function deleteAddressBook($addressBookId) { + public function deleteAddressBook($addressBookId) { $query = $this->db->getQueryBuilder(); $query->delete('cards') ->where($query->expr()->eq('addressbookid', $query->createParameter('addressbookid'))) @@ -490,7 +490,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param mixed $addressBookId * @return array */ - function getCards($addressBookId) { + public function getCards($addressBookId) { $query = $this->db->getQueryBuilder(); $query->select(['id', 'uri', 'lastmodified', 'etag', 'size', 'carddata', 'uid']) ->from('cards') @@ -521,7 +521,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param string $cardUri * @return array */ - function getCard($addressBookId, $cardUri) { + public function getCard($addressBookId, $cardUri) { $query = $this->db->getQueryBuilder(); $query->select(['id', 'uri', 'lastmodified', 'etag', 'size', 'carddata', 'uid']) ->from('cards') @@ -552,7 +552,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param string[] $uris * @return array */ - function getMultipleCards($addressBookId, array $uris) { + public function getMultipleCards($addressBookId, array $uris) { if (empty($uris)) { return []; } @@ -605,7 +605,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param string $cardData * @return string */ - function createCard($addressBookId, $cardUri, $cardData) { + public function createCard($addressBookId, $cardUri, $cardData) { $etag = md5($cardData); $uid = $this->getUID($cardData); @@ -672,7 +672,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param string $cardData * @return string */ - function updateCard($addressBookId, $cardUri, $cardData) { + public function updateCard($addressBookId, $cardUri, $cardData) { $uid = $this->getUID($cardData); $etag = md5($cardData); $query = $this->db->getQueryBuilder(); @@ -705,7 +705,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param string $cardUri * @return bool */ - function deleteCard($addressBookId, $cardUri) { + public function deleteCard($addressBookId, $cardUri) { try { $cardId = $this->getCardId($addressBookId, $cardUri); } catch (\InvalidArgumentException $e) { @@ -790,7 +790,7 @@ class CardDavBackend implements BackendInterface, SyncSupport { * @param int $limit * @return array */ - function getChangesForAddressBook($addressBookId, $syncToken, $syncLevel, $limit = null) { + public function getChangesForAddressBook($addressBookId, $syncToken, $syncLevel, $limit = null) { // Current synctoken $stmt = $this->db->prepare('SELECT `synctoken` FROM `*PREFIX*addressbooks` WHERE `id` = ?'); $stmt->execute([ $addressBookId ]); diff --git a/apps/dav/lib/CardDAV/HasPhotoPlugin.php b/apps/dav/lib/CardDAV/HasPhotoPlugin.php index 3cf9e0f9a61..bb847e74a37 100644 --- a/apps/dav/lib/CardDAV/HasPhotoPlugin.php +++ b/apps/dav/lib/CardDAV/HasPhotoPlugin.php @@ -45,7 +45,7 @@ class HasPhotoPlugin extends ServerPlugin { * @param Server $server * @return void */ - function initialize(Server $server) { + public function initialize(Server $server) { $server->on('propFind', [$this, 'propFind']); } @@ -56,7 +56,7 @@ class HasPhotoPlugin extends ServerPlugin { * @param INode $node * @return void */ - function propFind(PropFind $propFind, INode $node) { + public function propFind(PropFind $propFind, INode $node) { $ns = '{http://nextcloud.com/ns}'; if ($node instanceof Card) { diff --git a/apps/dav/lib/CardDAV/Plugin.php b/apps/dav/lib/CardDAV/Plugin.php index 430fda4578d..1a89bf58f9b 100644 --- a/apps/dav/lib/CardDAV/Plugin.php +++ b/apps/dav/lib/CardDAV/Plugin.php @@ -30,7 +30,7 @@ use Sabre\DAV\PropFind; use Sabre\DAV\Server; class Plugin extends \Sabre\CardDAV\Plugin { - function initialize(Server $server) { + public function initialize(Server $server) { $server->on('propFind', [$this, 'propFind']); parent::initialize($server); } @@ -63,7 +63,7 @@ class Plugin extends \Sabre\CardDAV\Plugin { * @param INode $node * @return void */ - function propFind(PropFind $propFind, INode $node) { + public function propFind(PropFind $propFind, INode $node) { $ns = '{http://owncloud.org/ns}'; if ($node instanceof AddressBook) { diff --git a/apps/dav/lib/CardDAV/UserAddressBooks.php b/apps/dav/lib/CardDAV/UserAddressBooks.php index 18fc286fdd9..ce03ce43548 100644 --- a/apps/dav/lib/CardDAV/UserAddressBooks.php +++ b/apps/dav/lib/CardDAV/UserAddressBooks.php @@ -62,7 +62,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome { * * @return IAddressBook[] */ - function getChildren() { + public function getChildren() { if ($this->l10n === null) { $this->l10n = \OC::$server->getL10N('dav'); } @@ -107,7 +107,7 @@ class UserAddressBooks extends \Sabre\CardDAV\AddressBookHome { * * @return array */ - function getACL() { + public function getACL() { $acl = parent::getACL(); if ($this->principalUri === 'principals/system/system') { $acl[] = [ diff --git a/apps/dav/lib/CardDAV/Xml/Groups.php b/apps/dav/lib/CardDAV/Xml/Groups.php index 0e001835c38..701aa679b44 100644 --- a/apps/dav/lib/CardDAV/Xml/Groups.php +++ b/apps/dav/lib/CardDAV/Xml/Groups.php @@ -39,7 +39,7 @@ class Groups implements XmlSerializable { $this->groups = $groups; } - function xmlSerialize(Writer $writer) { + public function xmlSerialize(Writer $writer) { foreach ($this->groups as $group) { $writer->writeElement('{' . self::NS_OWNCLOUD . '}group', $group); } diff --git a/apps/dav/lib/Command/CreateAddressBook.php b/apps/dav/lib/Command/CreateAddressBook.php index 5756c4b37b5..ac91e727953 100644 --- a/apps/dav/lib/Command/CreateAddressBook.php +++ b/apps/dav/lib/Command/CreateAddressBook.php @@ -43,7 +43,7 @@ class CreateAddressBook extends Command { * @param IUserManager $userManager * @param CardDavBackend $cardDavBackend */ - function __construct(IUserManager $userManager, + public function __construct(IUserManager $userManager, CardDavBackend $cardDavBackend ) { parent::__construct(); diff --git a/apps/dav/lib/Command/CreateCalendar.php b/apps/dav/lib/Command/CreateCalendar.php index d2e19ef99d9..d7597b8b1f6 100644 --- a/apps/dav/lib/Command/CreateCalendar.php +++ b/apps/dav/lib/Command/CreateCalendar.php @@ -53,7 +53,7 @@ class CreateCalendar extends Command { * @param IGroupManager $groupManager * @param IDBConnection $dbConnection */ - function __construct(IUserManager $userManager, IGroupManager $groupManager, IDBConnection $dbConnection) { + public function __construct(IUserManager $userManager, IGroupManager $groupManager, IDBConnection $dbConnection) { parent::__construct(); $this->userManager = $userManager; $this->groupManager = $groupManager; diff --git a/apps/dav/lib/Command/ListCalendars.php b/apps/dav/lib/Command/ListCalendars.php index e63fbd2066e..8687207ef31 100644 --- a/apps/dav/lib/Command/ListCalendars.php +++ b/apps/dav/lib/Command/ListCalendars.php @@ -46,7 +46,7 @@ class ListCalendars extends Command { * @param IUserManager $userManager * @param CalDavBackend $caldav */ - function __construct(IUserManager $userManager, CalDavBackend $caldav) { + public function __construct(IUserManager $userManager, CalDavBackend $caldav) { parent::__construct(); $this->userManager = $userManager; $this->caldav = $caldav; diff --git a/apps/dav/lib/Command/MoveCalendar.php b/apps/dav/lib/Command/MoveCalendar.php index 845e8970698..366e51ad189 100644 --- a/apps/dav/lib/Command/MoveCalendar.php +++ b/apps/dav/lib/Command/MoveCalendar.php @@ -72,7 +72,7 @@ class MoveCalendar extends Command { * @param IL10N $l10n * @param CalDavBackend $calDav */ - function __construct( + public function __construct( IUserManager $userManager, IGroupManager $groupManager, IShareManager $shareManager, diff --git a/apps/dav/lib/Command/SyncBirthdayCalendar.php b/apps/dav/lib/Command/SyncBirthdayCalendar.php index 211df745e41..14e77e08d73 100644 --- a/apps/dav/lib/Command/SyncBirthdayCalendar.php +++ b/apps/dav/lib/Command/SyncBirthdayCalendar.php @@ -52,7 +52,7 @@ class SyncBirthdayCalendar extends Command { * @param IConfig $config * @param BirthdayService $birthdayService */ - function __construct(IUserManager $userManager, IConfig $config, + public function __construct(IUserManager $userManager, IConfig $config, BirthdayService $birthdayService) { parent::__construct(); $this->birthdayService = $birthdayService; diff --git a/apps/dav/lib/Command/SyncSystemAddressBook.php b/apps/dav/lib/Command/SyncSystemAddressBook.php index f707e733add..1f139de236a 100644 --- a/apps/dav/lib/Command/SyncSystemAddressBook.php +++ b/apps/dav/lib/Command/SyncSystemAddressBook.php @@ -37,7 +37,7 @@ class SyncSystemAddressBook extends Command { /** * @param SyncService $syncService */ - function __construct(SyncService $syncService) { + public function __construct(SyncService $syncService) { parent::__construct(); $this->syncService = $syncService; } diff --git a/apps/dav/lib/Comments/CommentNode.php b/apps/dav/lib/Comments/CommentNode.php index e02eef1cd51..d21f13ebccd 100644 --- a/apps/dav/lib/Comments/CommentNode.php +++ b/apps/dav/lib/Comments/CommentNode.php @@ -104,7 +104,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return array */ - static public function getPropertyNames() { + public static function getPropertyNames() { return [ '{http://owncloud.org/ns}id', '{http://owncloud.org/ns}parentId', @@ -144,7 +144,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return void */ - function delete() { + public function delete() { $this->checkWriteAccessOnComment(); $this->commentsManager->delete($this->comment->getId()); } @@ -156,7 +156,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return string */ - function getName() { + public function getName() { return $this->comment->getId(); } @@ -166,7 +166,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @param string $name The new name * @throws MethodNotAllowed */ - function setName($name) { + public function setName($name) { throw new MethodNotAllowed(); } @@ -175,7 +175,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * * @return int */ - function getLastModified() { + public function getLastModified() { return null; } @@ -215,7 +215,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @param PropPatch $propPatch * @return void */ - function propPatch(PropPatch $propPatch) { + public function propPatch(PropPatch $propPatch) { // other properties than 'message' are read only $propPatch->handle(self::PROPERTY_NAME_MESSAGE, [$this, 'updateComment']); } @@ -235,7 +235,7 @@ class CommentNode implements \Sabre\DAV\INode, \Sabre\DAV\IProperties { * @param array $properties * @return array */ - function getProperties($properties) { + public function getProperties($properties) { $properties = array_keys($this->properties); $result = []; diff --git a/apps/dav/lib/Comments/CommentsPlugin.php b/apps/dav/lib/Comments/CommentsPlugin.php index ebdf3fde318..ecfb5e5cfab 100644 --- a/apps/dav/lib/Comments/CommentsPlugin.php +++ b/apps/dav/lib/Comments/CommentsPlugin.php @@ -83,7 +83,7 @@ class CommentsPlugin extends ServerPlugin { * @param Server $server * @return void */ - function initialize(Server $server) { + public function initialize(Server $server) { $this->server = $server; if (strpos($this->server->getRequestUri(), 'comments/') !== 0) { return; diff --git a/apps/dav/lib/Comments/EntityCollection.php b/apps/dav/lib/Comments/EntityCollection.php index 94ee3d2a250..d64c5c36423 100644 --- a/apps/dav/lib/Comments/EntityCollection.php +++ b/apps/dav/lib/Comments/EntityCollection.php @@ -98,7 +98,7 @@ class EntityCollection extends RootCollection implements IProperties { * @return \Sabre\DAV\INode * @throws NotFound */ - function getChild($name) { + public function getChild($name) { try { $comment = $this->commentsManager->get($name); return new CommentNode( @@ -118,7 +118,7 @@ class EntityCollection extends RootCollection implements IProperties { * * @return \Sabre\DAV\INode[] */ - function getChildren() { + public function getChildren() { return $this->findChildren(); } @@ -131,7 +131,7 @@ class EntityCollection extends RootCollection implements IProperties { * @param \DateTime|null $datetime * @return CommentNode[] */ - function findChildren($limit = 0, $offset = 0, \DateTime $datetime = null) { + public function findChildren($limit = 0, $offset = 0, \DateTime $datetime = null) { $comments = $this->commentsManager->getForObject($this->name, $this->id, $limit, $offset, $datetime); $result = []; foreach ($comments as $comment) { @@ -152,7 +152,7 @@ class EntityCollection extends RootCollection implements IProperties { * @param string $name * @return bool */ - function childExists($name) { + public function childExists($name) { try { $this->commentsManager->get($name); return true; @@ -177,14 +177,14 @@ class EntityCollection extends RootCollection implements IProperties { /** * @inheritdoc */ - function propPatch(PropPatch $propPatch) { + public function propPatch(PropPatch $propPatch) { $propPatch->handle(self::PROPERTY_NAME_READ_MARKER, [$this, 'setReadMarker']); } /** * @inheritdoc */ - function getProperties($properties) { + public function getProperties($properties) { $marker = null; $user = $this->userSession->getUser(); if (!is_null($user)) { diff --git a/apps/dav/lib/Comments/EntityTypeCollection.php b/apps/dav/lib/Comments/EntityTypeCollection.php index 275b41c87e0..59f7cf4748d 100644 --- a/apps/dav/lib/Comments/EntityTypeCollection.php +++ b/apps/dav/lib/Comments/EntityTypeCollection.php @@ -90,7 +90,7 @@ class EntityTypeCollection extends RootCollection { * @return \Sabre\DAV\INode * @throws NotFound */ - function getChild($name) { + public function getChild($name) { if (!$this->childExists($name)) { throw new NotFound('Entity does not exist or is not available'); } @@ -110,7 +110,7 @@ class EntityTypeCollection extends RootCollection { * @return \Sabre\DAV\INode[] * @throws MethodNotAllowed */ - function getChildren() { + public function getChildren() { throw new MethodNotAllowed('No permission to list folder contents'); } @@ -120,7 +120,7 @@ class EntityTypeCollection extends RootCollection { * @param string $name * @return bool */ - function childExists($name) { + public function childExists($name) { return call_user_func($this->childExistsFunction, $name); } } diff --git a/apps/dav/lib/Comments/RootCollection.php b/apps/dav/lib/Comments/RootCollection.php index b6703a13a11..560d0105de9 100644 --- a/apps/dav/lib/Comments/RootCollection.php +++ b/apps/dav/lib/Comments/RootCollection.php @@ -118,7 +118,7 @@ class RootCollection implements ICollection { * @return null|string * @throws Forbidden */ - function createFile($name, $data = null) { + public function createFile($name, $data = null) { throw new Forbidden('Cannot create comments by id'); } @@ -128,7 +128,7 @@ class RootCollection implements ICollection { * @param string $name * @throws Forbidden */ - function createDirectory($name) { + public function createDirectory($name) { throw new Forbidden('Permission denied to create collections'); } @@ -142,7 +142,7 @@ class RootCollection implements ICollection { * @return \Sabre\DAV\INode * @throws NotFound */ - function getChild($name) { + public function getChild($name) { $this->initCollections(); if (isset($this->entityTypeCollections[$name])) { return $this->entityTypeCollections[$name]; @@ -155,7 +155,7 @@ class RootCollection implements ICollection { * * @return \Sabre\DAV\INode[] */ - function getChildren() { + public function getChildren() { $this->initCollections(); return $this->entityTypeCollections; } @@ -166,7 +166,7 @@ class RootCollection implements ICollection { * @param string $name * @return bool */ - function childExists($name) { + public function childExists($name) { $this->initCollections(); return isset($this->entityTypeCollections[$name]); } @@ -176,7 +176,7 @@ class RootCollection implements ICollection { * * @throws Forbidden */ - function delete() { + public function delete() { throw new Forbidden('Permission denied to delete this collection'); } @@ -187,7 +187,7 @@ class RootCollection implements ICollection { * * @return string */ - function getName() { + public function getName() { return $this->name; } @@ -197,7 +197,7 @@ class RootCollection implements ICollection { * @param string $name The new name * @throws Forbidden */ - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this collection'); } @@ -206,7 +206,7 @@ class RootCollection implements ICollection { * * @return int */ - function getLastModified() { + public function getLastModified() { return null; } } diff --git a/apps/dav/lib/Connector/Sabre/Auth.php b/apps/dav/lib/Connector/Sabre/Auth.php index 8457670be6b..ba33d3234b3 100644 --- a/apps/dav/lib/Connector/Sabre/Auth.php +++ b/apps/dav/lib/Connector/Sabre/Auth.php @@ -151,7 +151,7 @@ class Auth extends AbstractBasic { * @throws NotAuthenticated * @throws ServiceUnavailable */ - function check(RequestInterface $request, ResponseInterface $response) { + public function check(RequestInterface $request, ResponseInterface $response) { try { return $this->auth($request, $response); } catch (NotAuthenticated $e) { diff --git a/apps/dav/lib/Connector/Sabre/ChecksumList.php b/apps/dav/lib/Connector/Sabre/ChecksumList.php index f5c0a3d9b01..7c9204cbe75 100644 --- a/apps/dav/lib/Connector/Sabre/ChecksumList.php +++ b/apps/dav/lib/Connector/Sabre/ChecksumList.php @@ -63,7 +63,7 @@ class ChecksumList implements XmlSerializable { * @param Writer $writer * @return void */ - function xmlSerialize(Writer $writer) { + public function xmlSerialize(Writer $writer) { foreach ($this->checksums as $checksum) { $writer->writeElement('{' . self::NS_OWNCLOUD . '}checksum', $checksum); } diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php index 31ea282308e..5ae8dcdb938 100644 --- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php @@ -65,7 +65,7 @@ class CommentPropertiesPlugin extends ServerPlugin { * @param \Sabre\DAV\Server $server * @return void */ - function initialize(\Sabre\DAV\Server $server) { + public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; $this->server->on('propFind', [$this, 'handleGetProperties']); } diff --git a/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php b/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php index 6462359aaff..5c1951cf7d8 100644 --- a/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php +++ b/apps/dav/lib/Connector/Sabre/CopyEtagHeaderPlugin.php @@ -72,7 +72,7 @@ class CopyEtagHeaderPlugin extends \Sabre\DAV\ServerPlugin { * @param string $destination * @return void */ - function afterMove($source, $destination) { + public function afterMove($source, $destination) { $node = $this->server->tree->getNodeForPath($destination); if ($node instanceof File) { $eTag = $node->getETag(); diff --git a/apps/dav/lib/Connector/Sabre/DavAclPlugin.php b/apps/dav/lib/Connector/Sabre/DavAclPlugin.php index 67be788eb04..f0dc8619ace 100644 --- a/apps/dav/lib/Connector/Sabre/DavAclPlugin.php +++ b/apps/dav/lib/Connector/Sabre/DavAclPlugin.php @@ -48,7 +48,7 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin { $this->allowUnauthenticatedAccess = false; } - function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT, $throwExceptions = true) { + public function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT, $throwExceptions = true) { $access = parent::checkPrivileges($uri, $privileges, $recursion, false); if ($access === false && $throwExceptions) { /** @var INode $node */ @@ -90,7 +90,7 @@ class DavAclPlugin extends \Sabre\DAVACL\Plugin { return parent::propFind($propFind, $node); } - function beforeMethod(RequestInterface $request, ResponseInterface $response) { + public function beforeMethod(RequestInterface $request, ResponseInterface $response) { $path = $request->getPath(); // prevent the plugin from causing an unneeded overhead for file requests diff --git a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php index 9c68b065dbb..71098aac1d0 100644 --- a/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php +++ b/apps/dav/lib/Connector/Sabre/DummyGetResponsePlugin.php @@ -50,7 +50,7 @@ class DummyGetResponsePlugin extends \Sabre\DAV\ServerPlugin { * @param \Sabre\DAV\Server $server * @return void */ - function initialize(\Sabre\DAV\Server $server) { + public function initialize(\Sabre\DAV\Server $server) { $this->server = $server; $this->server->on('method:GET', [$this, 'httpGet'], 200); } @@ -60,7 +60,7 @@ class DummyGetResponsePlugin extends \Sabre\DAV\ServerPlugin { * @param ResponseInterface $response * @return false */ - function httpGet(RequestInterface $request, ResponseInterface $response) { + public function httpGet(RequestInterface $request, ResponseInterface $response) { $string = 'This is the WebDAV interface. It can only be accessed by ' . 'WebDAV clients such as the Nextcloud desktop sync client.'; $stream = fopen('php://memory','r+'); diff --git a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php index bca15e15688..1ab4f3d385a 100644 --- a/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FakeLockerPlugin.php @@ -77,7 +77,7 @@ class FakeLockerPlugin extends ServerPlugin { * * @return integer[] */ - function getFeatures() { + public function getFeatures() { return [2]; } @@ -88,7 +88,7 @@ class FakeLockerPlugin extends ServerPlugin { * @param INode $node * @return void */ - function propFind(PropFind $propFind, INode $node) { + public function propFind(PropFind $propFind, INode $node) { $propFind->handle('{DAV:}supportedlock', function () { return new SupportedLock(true); }); diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 5f2bbdd12e3..e14fd691f45 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -197,7 +197,7 @@ class FilesPlugin extends ServerPlugin { * @throws Forbidden * @throws NotFound */ - function checkMove($source, $destination) { + public function checkMove($source, $destination) { $sourceNode = $this->tree->getNodeForPath($source); if (!$sourceNode instanceof Node) { return; @@ -225,7 +225,7 @@ class FilesPlugin extends ServerPlugin { * @param RequestInterface $request * @param ResponseInterface $response */ - function handleDownloadToken(RequestInterface $request, ResponseInterface $response) { + public function handleDownloadToken(RequestInterface $request, ResponseInterface $response) { $queryParams = $request->getQueryParameters(); /** @@ -249,7 +249,7 @@ class FilesPlugin extends ServerPlugin { * @param RequestInterface $request * @param ResponseInterface $response */ - function httpGet(RequestInterface $request, ResponseInterface $response) { + public function httpGet(RequestInterface $request, ResponseInterface $response) { // Only handle valid files $node = $this->tree->getNodeForPath($request->getPath()); if (!($node instanceof IFile)) { diff --git a/apps/dav/lib/Connector/Sabre/Principal.php b/apps/dav/lib/Connector/Sabre/Principal.php index b6a96053cb3..673b8c237e9 100644 --- a/apps/dav/lib/Connector/Sabre/Principal.php +++ b/apps/dav/lib/Connector/Sabre/Principal.php @@ -224,7 +224,7 @@ class Principal implements BackendInterface { * @param PropPatch $propPatch * @return int */ - function updatePrincipal($path, PropPatch $propPatch) { + public function updatePrincipal($path, PropPatch $propPatch) { return 0; } @@ -371,7 +371,7 @@ class Principal implements BackendInterface { * @param string $test * @return array */ - function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { + public function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { if (count($searchProperties) === 0) { return []; } @@ -390,7 +390,7 @@ class Principal implements BackendInterface { * @param string $principalPrefix * @return string */ - function findByUri($uri, $principalPrefix) { + public function findByUri($uri, $principalPrefix) { // If sharing is disabled, return the empty array $shareAPIEnabled = $this->shareManager->shareApiEnabled(); if (!$shareAPIEnabled) { diff --git a/apps/dav/lib/Connector/Sabre/ShareTypeList.php b/apps/dav/lib/Connector/Sabre/ShareTypeList.php index ab85c80aa55..ed32b7a00b1 100644 --- a/apps/dav/lib/Connector/Sabre/ShareTypeList.php +++ b/apps/dav/lib/Connector/Sabre/ShareTypeList.php @@ -63,7 +63,7 @@ class ShareTypeList implements Element { * @param Reader $reader * @return mixed */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $shareTypes = []; $tree = $reader->parseInnerTree(); @@ -84,7 +84,7 @@ class ShareTypeList implements Element { * @param Writer $writer * @return void */ - function xmlSerialize(Writer $writer) { + public function xmlSerialize(Writer $writer) { foreach ($this->shareTypes as $shareType) { $writer->writeElement('{' . self::NS_OWNCLOUD . '}share-type', $shareType); } diff --git a/apps/dav/lib/Connector/Sabre/ShareeList.php b/apps/dav/lib/Connector/Sabre/ShareeList.php index 67b42aad919..d303305fe47 100644 --- a/apps/dav/lib/Connector/Sabre/ShareeList.php +++ b/apps/dav/lib/Connector/Sabre/ShareeList.php @@ -50,7 +50,7 @@ class ShareeList implements XmlSerializable { * @param Writer $writer * @return void */ - function xmlSerialize(Writer $writer) { + public function xmlSerialize(Writer $writer) { foreach ($this->shares as $share) { $writer->startElement('{' . self::NS_NEXTCLOUD . '}sharee'); $writer->writeElement('{' . self::NS_NEXTCLOUD . '}id', $share->getSharedWith()); diff --git a/apps/dav/lib/Connector/Sabre/TagList.php b/apps/dav/lib/Connector/Sabre/TagList.php index 72c3fb31b07..c73f698c188 100644 --- a/apps/dav/lib/Connector/Sabre/TagList.php +++ b/apps/dav/lib/Connector/Sabre/TagList.php @@ -80,7 +80,7 @@ class TagList implements Element { * @param Reader $reader * @return mixed */ - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $tags = []; $tree = $reader->parseInnerTree(); @@ -114,7 +114,7 @@ class TagList implements Element { * @param Writer $writer * @return void */ - function xmlSerialize(Writer $writer) { + public function xmlSerialize(Writer $writer) { foreach ($this->tags as $tag) { $writer->writeElement('{' . self::NS_OWNCLOUD . '}tag', $tag); } diff --git a/apps/dav/lib/DAV/GroupPrincipalBackend.php b/apps/dav/lib/DAV/GroupPrincipalBackend.php index f03c7cc2bdd..cfa896c4f2c 100644 --- a/apps/dav/lib/DAV/GroupPrincipalBackend.php +++ b/apps/dav/lib/DAV/GroupPrincipalBackend.php @@ -167,7 +167,7 @@ class GroupPrincipalBackend implements BackendInterface { * @param PropPatch $propPatch * @return int */ - function updatePrincipal($path, PropPatch $propPatch) { + public function updatePrincipal($path, PropPatch $propPatch) { return 0; } @@ -177,7 +177,7 @@ class GroupPrincipalBackend implements BackendInterface { * @param string $test * @return array */ - function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { + public function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { $results = []; if (\count($searchProperties) === 0) { @@ -257,7 +257,7 @@ class GroupPrincipalBackend implements BackendInterface { * @param string $principalPrefix * @return string */ - function findByUri($uri, $principalPrefix) { + public function findByUri($uri, $principalPrefix) { // If sharing is disabled, return the empty array $shareAPIEnabled = $this->shareManager->shareApiEnabled(); if (!$shareAPIEnabled) { diff --git a/apps/dav/lib/DAV/PublicAuth.php b/apps/dav/lib/DAV/PublicAuth.php index 407f1a2853f..d37c2dd46f6 100644 --- a/apps/dav/lib/DAV/PublicAuth.php +++ b/apps/dav/lib/DAV/PublicAuth.php @@ -67,7 +67,7 @@ class PublicAuth implements BackendInterface { * @param ResponseInterface $response * @return array */ - function check(RequestInterface $request, ResponseInterface $response) { + public function check(RequestInterface $request, ResponseInterface $response) { if ($this->isRequestPublic($request)) { return [true, "principals/system/public"]; } @@ -77,7 +77,7 @@ class PublicAuth implements BackendInterface { /** * @inheritdoc */ - function challenge(RequestInterface $request, ResponseInterface $response) { + public function challenge(RequestInterface $request, ResponseInterface $response) { } /** diff --git a/apps/dav/lib/DAV/Sharing/IShareable.php b/apps/dav/lib/DAV/Sharing/IShareable.php index 1293721040a..ffe9e3691dc 100644 --- a/apps/dav/lib/DAV/Sharing/IShareable.php +++ b/apps/dav/lib/DAV/Sharing/IShareable.php @@ -49,7 +49,7 @@ interface IShareable extends INode { * @param array $remove * @return void */ - function updateShares(array $add, array $remove); + public function updateShares(array $add, array $remove); /** * Returns the list of people whom this resource is shared with. @@ -63,7 +63,7 @@ interface IShareable extends INode { * * @return array */ - function getShares(); + public function getShares(); /** * @return int diff --git a/apps/dav/lib/DAV/Sharing/Plugin.php b/apps/dav/lib/DAV/Sharing/Plugin.php index 67eed9c9b4a..148afa323dd 100644 --- a/apps/dav/lib/DAV/Sharing/Plugin.php +++ b/apps/dav/lib/DAV/Sharing/Plugin.php @@ -72,7 +72,7 @@ class Plugin extends ServerPlugin { * * @return string[] */ - function getFeatures() { + public function getFeatures() { return ['oc-resource-sharing']; } @@ -84,7 +84,7 @@ class Plugin extends ServerPlugin { * * @return string */ - function getPluginName() { + public function getPluginName() { return 'oc-resource-sharing'; } @@ -99,7 +99,7 @@ class Plugin extends ServerPlugin { * @param Server $server * @return void */ - function initialize(Server $server) { + public function initialize(Server $server) { $this->server = $server; $this->server->xml->elementMap['{' . Plugin::NS_OWNCLOUD . '}share'] = ShareRequest::class; $this->server->xml->elementMap['{' . Plugin::NS_OWNCLOUD . '}invite'] = Invite::class; @@ -115,7 +115,7 @@ class Plugin extends ServerPlugin { * @param ResponseInterface $response * @return null|false */ - function httpPost(RequestInterface $request, ResponseInterface $response) { + public function httpPost(RequestInterface $request, ResponseInterface $response) { $path = $request->getPath(); // Only handling xml @@ -188,7 +188,7 @@ class Plugin extends ServerPlugin { * @param INode $node * @return void */ - function propFind(PropFind $propFind, INode $node) { + public function propFind(PropFind $propFind, INode $node) { if ($node instanceof IShareable) { $propFind->handle('{' . Plugin::NS_OWNCLOUD . '}invite', function () use ($node) { return new Invite( diff --git a/apps/dav/lib/DAV/Sharing/Xml/Invite.php b/apps/dav/lib/DAV/Sharing/Xml/Invite.php index 68aab171ab7..315ede2ce9c 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/Invite.php +++ b/apps/dav/lib/DAV/Sharing/Xml/Invite.php @@ -84,7 +84,7 @@ class Invite implements XmlSerializable { * * @param array $users */ - function __construct(array $users, array $organizer = null) { + public function __construct(array $users, array $organizer = null) { $this->users = $users; $this->organizer = $organizer; } @@ -94,7 +94,7 @@ class Invite implements XmlSerializable { * * @return array */ - function getValue() { + public function getValue() { return $this->users; } @@ -117,7 +117,7 @@ class Invite implements XmlSerializable { * @param Writer $writer * @return void */ - function xmlSerialize(Writer $writer) { + public function xmlSerialize(Writer $writer) { $cs = '{' . Plugin::NS_OWNCLOUD . '}'; if (!is_null($this->organizer)) { diff --git a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php index d76e65aa232..c973908f5a8 100644 --- a/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php +++ b/apps/dav/lib/DAV/Sharing/Xml/ShareRequest.php @@ -38,12 +38,12 @@ class ShareRequest implements XmlDeserializable { * @param array $set * @param array $remove */ - function __construct(array $set, array $remove) { + public function __construct(array $set, array $remove) { $this->set = $set; $this->remove = $remove; } - static function xmlDeserialize(Reader $reader) { + public static function xmlDeserialize(Reader $reader) { $elements = $reader->parseInnerTree([ '{' . Plugin::NS_OWNCLOUD. '}set' => 'Sabre\\Xml\\Element\\KeyValue', '{' . Plugin::NS_OWNCLOUD . '}remove' => 'Sabre\\Xml\\Element\\KeyValue', diff --git a/apps/dav/lib/DAV/SystemPrincipalBackend.php b/apps/dav/lib/DAV/SystemPrincipalBackend.php index c369f4da375..ebe1d61db4a 100644 --- a/apps/dav/lib/DAV/SystemPrincipalBackend.php +++ b/apps/dav/lib/DAV/SystemPrincipalBackend.php @@ -43,7 +43,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @param string $prefixPath * @return array */ - function getPrincipalsByPrefix($prefixPath) { + public function getPrincipalsByPrefix($prefixPath) { $principals = []; if ($prefixPath === 'principals/system') { @@ -68,7 +68,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @param string $path * @return array */ - function getPrincipalByPath($path) { + public function getPrincipalByPath($path) { if ($path === 'principals/system/system') { $principal = [ 'uri' => 'principals/system/system', @@ -103,7 +103,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @param \Sabre\DAV\PropPatch $propPatch * @return void */ - function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch) { + public function updatePrincipal($path, \Sabre\DAV\PropPatch $propPatch) { } /** @@ -135,7 +135,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @param string $test * @return array */ - function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { + public function searchPrincipals($prefixPath, array $searchProperties, $test = 'allof') { return []; } @@ -145,7 +145,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @param string $principal * @return array */ - function getGroupMemberSet($principal) { + public function getGroupMemberSet($principal) { // TODO: for now the group principal has only one member, the user itself $principal = $this->getPrincipalByPath($principal); if (!$principal) { @@ -161,7 +161,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @param string $principal * @return array */ - function getGroupMembership($principal) { + public function getGroupMembership($principal) { list($prefix, ) = \Sabre\Uri\split($principal); if ($prefix === 'principals/system') { @@ -184,7 +184,7 @@ class SystemPrincipalBackend extends AbstractBackend { * @param array $members * @return void */ - function setGroupMemberSet($principal, array $members) { + public function setGroupMemberSet($principal, array $members) { throw new \Sabre\DAV\Exception('Setting members of the group is not supported yet'); } } diff --git a/apps/dav/lib/Files/BrowserErrorPagePlugin.php b/apps/dav/lib/Files/BrowserErrorPagePlugin.php index 47de5020d56..5f9c5916d89 100644 --- a/apps/dav/lib/Files/BrowserErrorPagePlugin.php +++ b/apps/dav/lib/Files/BrowserErrorPagePlugin.php @@ -48,7 +48,7 @@ class BrowserErrorPagePlugin extends ServerPlugin { * @param Server $server * @return void */ - function initialize(Server $server) { + public function initialize(Server $server) { $this->server = $server; $server->on('exception', [$this, 'logException'], 1000); } diff --git a/apps/dav/lib/Files/FilesHome.php b/apps/dav/lib/Files/FilesHome.php index c0f243b34fe..71c663b2e2b 100644 --- a/apps/dav/lib/Files/FilesHome.php +++ b/apps/dav/lib/Files/FilesHome.php @@ -49,16 +49,16 @@ class FilesHome extends Directory { parent::__construct($view, $userFolder); } - function delete() { + public function delete() { throw new Forbidden('Permission denied to delete home folder'); } - function getName() { + public function getName() { list(,$name) = \Sabre\Uri\split($this->principalInfo['uri']); return $name; } - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this folder'); } } diff --git a/apps/dav/lib/Files/RootCollection.php b/apps/dav/lib/Files/RootCollection.php index 22142b46e1c..b83e944edcc 100644 --- a/apps/dav/lib/Files/RootCollection.php +++ b/apps/dav/lib/Files/RootCollection.php @@ -42,7 +42,7 @@ class RootCollection extends AbstractPrincipalCollection { * @param array $principalInfo * @return INode */ - function getChildForPrincipal(array $principalInfo) { + public function getChildForPrincipal(array $principalInfo) { list(,$name) = \Sabre\Uri\split($principalInfo['uri']); $user = \OC::$server->getUserSession()->getUser(); if (is_null($user) || $name !== $user->getUID()) { @@ -58,7 +58,7 @@ class RootCollection extends AbstractPrincipalCollection { return new FilesHome($principalInfo, $userFolder); } - function getName() { + public function getName() { return 'files'; } } diff --git a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php index e44150aaabe..c50fb03dd40 100644 --- a/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsByIdCollection.php @@ -86,21 +86,21 @@ class SystemTagsByIdCollection implements ICollection { * @param resource|string $data Initial payload * @throws Forbidden */ - function createFile($name, $data = null) { + public function createFile($name, $data = null) { throw new Forbidden('Cannot create tags by id'); } /** * @param string $name */ - function createDirectory($name) { + public function createDirectory($name) { throw new Forbidden('Permission denied to create collections'); } /** * @param string $name */ - function getChild($name) { + public function getChild($name) { try { $tag = $this->tagManager->getTagsByIds([$name]); $tag = current($tag); @@ -115,7 +115,7 @@ class SystemTagsByIdCollection implements ICollection { } } - function getChildren() { + public function getChildren() { $visibilityFilter = true; if ($this->isAdmin()) { $visibilityFilter = null; @@ -130,7 +130,7 @@ class SystemTagsByIdCollection implements ICollection { /** * @param string $name */ - function childExists($name) { + public function childExists($name) { try { $tag = $this->tagManager->getTagsByIds([$name]); $tag = current($tag); @@ -145,15 +145,15 @@ class SystemTagsByIdCollection implements ICollection { } } - function delete() { + public function delete() { throw new Forbidden('Permission denied to delete this collection'); } - function getName() { + public function getName() { return 'systemtags'; } - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this collection'); } @@ -162,7 +162,7 @@ class SystemTagsByIdCollection implements ICollection { * * @return int */ - function getLastModified() { + public function getLastModified() { return null; } diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php index bb74884419a..03cab4c9dc1 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectMappingCollection.php @@ -92,7 +92,7 @@ class SystemTagsObjectMappingCollection implements ICollection { $this->user = $user; } - function createFile($tagId, $data = null) { + public function createFile($tagId, $data = null) { try { $tags = $this->tagManager->getTagsByIds([$tagId]); $tag = current($tags); @@ -109,11 +109,11 @@ class SystemTagsObjectMappingCollection implements ICollection { } } - function createDirectory($name) { + public function createDirectory($name) { throw new Forbidden('Permission denied to create collections'); } - function getChild($tagId) { + public function getChild($tagId) { try { if ($this->tagMapper->haveTag([$this->objectId], $this->objectType, $tagId, true)) { $tag = $this->tagManager->getTagsByIds([$tagId]); @@ -130,7 +130,7 @@ class SystemTagsObjectMappingCollection implements ICollection { } } - function getChildren() { + public function getChildren() { $tagIds = current($this->tagMapper->getTagIdsForObjects([$this->objectId], $this->objectType)); if (empty($tagIds)) { return []; @@ -147,7 +147,7 @@ class SystemTagsObjectMappingCollection implements ICollection { }, $tags)); } - function childExists($tagId) { + public function childExists($tagId) { try { $result = $this->tagMapper->haveTag([$this->objectId], $this->objectType, $tagId, true); @@ -167,15 +167,15 @@ class SystemTagsObjectMappingCollection implements ICollection { } } - function delete() { + public function delete() { throw new Forbidden('Permission denied to delete this collection'); } - function getName() { + public function getName() { return $this->objectId; } - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this collection'); } @@ -184,7 +184,7 @@ class SystemTagsObjectMappingCollection implements ICollection { * * @return int */ - function getLastModified() { + public function getLastModified() { return null; } diff --git a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php index 80741342991..0e3560ab330 100644 --- a/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsObjectTypeCollection.php @@ -101,7 +101,7 @@ class SystemTagsObjectTypeCollection implements ICollection { * @return null|string * @throws Forbidden */ - function createFile($name, $data = null) { + public function createFile($name, $data = null) { throw new Forbidden('Permission denied to create nodes'); } @@ -109,7 +109,7 @@ class SystemTagsObjectTypeCollection implements ICollection { * @param string $name * @throws Forbidden */ - function createDirectory($name) { + public function createDirectory($name) { throw new Forbidden('Permission denied to create collections'); } @@ -118,7 +118,7 @@ class SystemTagsObjectTypeCollection implements ICollection { * @return SystemTagsObjectMappingCollection * @throws NotFound */ - function getChild($objectId) { + public function getChild($objectId) { // make sure the object exists and is reachable if (!$this->childExists($objectId)) { throw new NotFound('Entity does not exist or is not available'); @@ -132,7 +132,7 @@ class SystemTagsObjectTypeCollection implements ICollection { ); } - function getChildren() { + public function getChildren() { // do not list object ids throw new MethodNotAllowed(); } @@ -143,15 +143,15 @@ class SystemTagsObjectTypeCollection implements ICollection { * @param string $name * @return bool */ - function childExists($name) { + public function childExists($name) { return call_user_func($this->childExistsFunction, $name); } - function delete() { + public function delete() { throw new Forbidden('Permission denied to delete this collection'); } - function getName() { + public function getName() { return $this->objectType; } @@ -159,7 +159,7 @@ class SystemTagsObjectTypeCollection implements ICollection { * @param string $name * @throws Forbidden */ - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this collection'); } @@ -168,7 +168,7 @@ class SystemTagsObjectTypeCollection implements ICollection { * * @return int */ - function getLastModified() { + public function getLastModified() { return null; } } diff --git a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php index bc4e6a8c4c4..b4d81a8e053 100644 --- a/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php +++ b/apps/dav/lib/SystemTag/SystemTagsRelationsCollection.php @@ -84,11 +84,11 @@ class SystemTagsRelationsCollection extends SimpleCollection { parent::__construct('root', $children); } - function getName() { + public function getName() { return 'systemtags-relations'; } - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this collection'); } } diff --git a/apps/dav/lib/Upload/ChunkingPlugin.php b/apps/dav/lib/Upload/ChunkingPlugin.php index 704cbf8f578..35487f61429 100644 --- a/apps/dav/lib/Upload/ChunkingPlugin.php +++ b/apps/dav/lib/Upload/ChunkingPlugin.php @@ -37,7 +37,7 @@ class ChunkingPlugin extends ServerPlugin { /** * @inheritdoc */ - function initialize(Server $server) { + public function initialize(Server $server) { $server->on('beforeMove', [$this, 'beforeMove']); $this->server = $server; } @@ -46,7 +46,7 @@ class ChunkingPlugin extends ServerPlugin { * @param string $sourcePath source path * @param string $destination destination path */ - function beforeMove($sourcePath, $destination) { + public function beforeMove($sourcePath, $destination) { $this->sourceNode = $this->server->tree->getNodeForPath($sourcePath); if (!$this->sourceNode instanceof FutureFile) { // skip handling as the source is not a chunked FutureFile diff --git a/apps/dav/lib/Upload/FutureFile.php b/apps/dav/lib/Upload/FutureFile.php index 34a5981bda2..335696f0e30 100644 --- a/apps/dav/lib/Upload/FutureFile.php +++ b/apps/dav/lib/Upload/FutureFile.php @@ -47,7 +47,7 @@ class FutureFile implements \Sabre\DAV\IFile { * @param Directory $root * @param string $name */ - function __construct(Directory $root, $name) { + public function __construct(Directory $root, $name) { $this->root = $root; $this->name = $name; } @@ -55,14 +55,14 @@ class FutureFile implements \Sabre\DAV\IFile { /** * @inheritdoc */ - function put($data) { + public function put($data) { throw new Forbidden('Permission denied to put into this file'); } /** * @inheritdoc */ - function get() { + public function get() { $nodes = $this->root->getChildren(); return AssemblyStream::wrap($nodes); } @@ -70,21 +70,21 @@ class FutureFile implements \Sabre\DAV\IFile { /** * @inheritdoc */ - function getContentType() { + public function getContentType() { return 'application/octet-stream'; } /** * @inheritdoc */ - function getETag() { + public function getETag() { return $this->root->getETag(); } /** * @inheritdoc */ - function getSize() { + public function getSize() { $children = $this->root->getChildren(); $sizes = array_map(function ($node) { /** @var IFile $node */ @@ -97,28 +97,28 @@ class FutureFile implements \Sabre\DAV\IFile { /** * @inheritdoc */ - function delete() { + public function delete() { $this->root->delete(); } /** * @inheritdoc */ - function getName() { + public function getName() { return $this->name; } /** * @inheritdoc */ - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this file'); } /** * @inheritdoc */ - function getLastModified() { + public function getLastModified() { return $this->root->getLastModified(); } } diff --git a/apps/dav/lib/Upload/UploadFolder.php b/apps/dav/lib/Upload/UploadFolder.php index 6778a30b8a2..d74154c6ac9 100644 --- a/apps/dav/lib/Upload/UploadFolder.php +++ b/apps/dav/lib/Upload/UploadFolder.php @@ -35,56 +35,56 @@ class UploadFolder implements ICollection { /** @var CleanupService */ private $cleanupService; - function __construct(Directory $node, CleanupService $cleanupService) { + public function __construct(Directory $node, CleanupService $cleanupService) { $this->node = $node; $this->cleanupService = $cleanupService; } - function createFile($name, $data = null) { + public function createFile($name, $data = null) { // TODO: verify name - should be a simple number $this->node->createFile($name, $data); } - function createDirectory($name) { + public function createDirectory($name) { throw new Forbidden('Permission denied to create file (filename ' . $name . ')'); } - function getChild($name) { + public function getChild($name) { if ($name === '.file') { return new FutureFile($this->node, '.file'); } return $this->node->getChild($name); } - function getChildren() { + public function getChildren() { $children = $this->node->getChildren(); $children[] = new FutureFile($this->node, '.file'); return $children; } - function childExists($name) { + public function childExists($name) { if ($name === '.file') { return true; } return $this->node->childExists($name); } - function delete() { + public function delete() { $this->node->delete(); // Background cleanup job is not needed anymore $this->cleanupService->removeJob($this->getName()); } - function getName() { + public function getName() { return $this->node->getName(); } - function setName($name) { + public function setName($name) { throw new Forbidden('Permission denied to rename this folder'); } - function getLastModified() { + public function getLastModified() { return $this->node->getLastModified(); } } |