summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/CardDAV
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
commit1584c9ae9c23d2a7915750ef9203cba0bcebf766 (patch)
tree568db931f631afd6e96772cf2b3ac539c989ec42 /apps/dav/lib/CardDAV
parenta7c8d26d31cb1cf69e0e060c53622e545fcfbbb3 (diff)
downloadnextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.tar.gz
nextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.zip
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/lib/CardDAV')
-rw-r--r--apps/dav/lib/CardDAV/AddressBookRoot.php4
-rw-r--r--apps/dav/lib/CardDAV/CardDavBackend.php22
-rw-r--r--apps/dav/lib/CardDAV/HasPhotoPlugin.php4
-rw-r--r--apps/dav/lib/CardDAV/Plugin.php4
-rw-r--r--apps/dav/lib/CardDAV/UserAddressBooks.php4
-rw-r--r--apps/dav/lib/CardDAV/Xml/Groups.php2
6 files changed, 20 insertions, 20 deletions
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);
}