From 62ef59616df68ba4d7cf1df57008b60e13049483 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 23 Feb 2017 10:33:54 +0100 Subject: [PATCH] Add public access modifier to all methods Signed-off-by: Joas Schilling --- apps/dav/lib/CalDAV/Calendar.php | 24 ++++++++++++------------ apps/dav/lib/CardDAV/AddressBook.php | 16 ++++++++-------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/dav/lib/CalDAV/Calendar.php b/apps/dav/lib/CalDAV/Calendar.php index 05c7e635391..696bbf20a41 100644 --- a/apps/dav/lib/CalDAV/Calendar.php +++ b/apps/dav/lib/CalDAV/Calendar.php @@ -107,7 +107,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { return $this->calendarInfo['principaluri']; } - function getACL() { + public function getACL() { $acl = [ [ 'privilege' => '{DAV:}read', @@ -152,18 +152,18 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { return $calDavBackend->applyShareAcl($this->getResourceId(), $acl); } - function getChildACL() { + public function getChildACL() { return $this->getACL(); } - function getOwner() { + public function getOwner() { if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal'])) { return $this->calendarInfo['{http://owncloud.org/ns}owner-principal']; } return parent::getOwner(); } - function delete() { + public function delete() { if (isset($this->calendarInfo['{http://owncloud.org/ns}owner-principal']) && $this->calendarInfo['{http://owncloud.org/ns}owner-principal'] !== $this->calendarInfo['principaluri']) { $principal = 'principal:' . parent::getOwner(); @@ -185,7 +185,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { parent::delete(); } - function propPatch(PropPatch $propPatch) { + public function propPatch(PropPatch $propPatch) { // parent::propPatch will only update calendars table // if calendar is shared, changes have to be made to the properties table if (!$this->isShared()) { @@ -193,7 +193,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { } } - function getChild($name) { + public function getChild($name) { $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); @@ -211,7 +211,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { } - function getChildren() { + public function getChildren() { $objs = $this->caldavBackend->getCalendarObjects($this->calendarInfo['id']); $children = []; @@ -226,7 +226,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { } - function getMultipleChildren(array $paths) { + public function getMultipleChildren(array $paths) { $objs = $this->caldavBackend->getMultipleCalendarObjects($this->calendarInfo['id'], $paths); $children = []; @@ -241,7 +241,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { } - function childExists($name) { + public function childExists($name) { $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); if (!$obj) { return false; @@ -253,7 +253,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { return true; } - function calendarQuery(array $filters) { + public function calendarQuery(array $filters) { $uris = $this->caldavBackend->calendarQuery($this->calendarInfo['id'], $filters); if ($this->isShared()) { @@ -269,7 +269,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { * @param boolean $value * @return string|null */ - function setPublishStatus($value) { + public function setPublishStatus($value) { $publicUri = $this->caldavBackend->setPublishStatus($value, $this); $this->calendarInfo['publicuri'] = $publicUri; return $publicUri; @@ -278,7 +278,7 @@ class Calendar extends \Sabre\CalDAV\Calendar implements IShareable { /** * @return mixed $value */ - function getPublishStatus() { + public function getPublishStatus() { return $this->caldavBackend->getPublishStatus($this); } diff --git a/apps/dav/lib/CardDAV/AddressBook.php b/apps/dav/lib/CardDAV/AddressBook.php index 84448c5459e..89c8571821f 100644 --- a/apps/dav/lib/CardDAV/AddressBook.php +++ b/apps/dav/lib/CardDAV/AddressBook.php @@ -66,7 +66,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { * @return void * @throws Forbidden */ - function updateShares(array $add, array $remove) { + public function updateShares(array $add, array $remove) { if ($this->isShared()) { throw new Forbidden(); } @@ -87,7 +87,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { * * @return array */ - function getShares() { + public function getShares() { if ($this->isShared()) { return []; } @@ -96,7 +96,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { return $carddavBackend->getShares($this->getResourceId()); } - function getACL() { + public function getACL() { $acl = [ [ 'privilege' => '{DAV:}read', @@ -139,11 +139,11 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { return $carddavBackend->applyShareAcl($this->getResourceId(), $acl); } - function getChildACL() { + public function getChildACL() { return $this->getACL(); } - function getChild($name) { + public function getChild($name) { $obj = $this->carddavBackend->getCard($this->addressBookInfo['id'], $name); if (!$obj) { @@ -161,14 +161,14 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { return $this->addressBookInfo['id']; } - function getOwner() { + public function getOwner() { if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) { return $this->addressBookInfo['{http://owncloud.org/ns}owner-principal']; } return parent::getOwner(); } - function delete() { + public function delete() { if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) { $principal = 'principal:' . parent::getOwner(); $shares = $this->carddavBackend->getShares($this->getResourceId()); @@ -189,7 +189,7 @@ class AddressBook extends \Sabre\CardDAV\AddressBook implements IShareable { parent::delete(); } - function propPatch(PropPatch $propPatch) { + public function propPatch(PropPatch $propPatch) { if (isset($this->addressBookInfo['{http://owncloud.org/ns}owner-principal'])) { throw new Forbidden(); } -- 2.39.5