aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-11-10 12:49:51 +0000
committerMario <mario@mariovavti.com>2019-11-10 14:10:03 +0100
commit580c3f4ffe9608d2beb56d418c68b3b112420e76 (patch)
tree82335d01179ac361d3f547a4b8e8c598d302e9f3 /vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
parentd22766f458a8539a40a57f3946459a9be1f21cd6 (diff)
downloadvolse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.gz
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.tar.bz2
volse-hubzilla-580c3f4ffe9608d2beb56d418c68b3b112420e76.zip
another bulk of composer updates
(cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce)
Diffstat (limited to 'vendor/sabre/dav/lib/CalDAV/SharedCalendar.php')
-rw-r--r--vendor/sabre/dav/lib/CalDAV/SharedCalendar.php84
1 files changed, 37 insertions, 47 deletions
diff --git a/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php b/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
index 7a77616e3..818392f57 100644
--- a/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
+++ b/vendor/sabre/dav/lib/CalDAV/SharedCalendar.php
@@ -1,5 +1,7 @@
<?php
+declare(strict_types=1);
+
namespace Sabre\CalDAV;
use Sabre\DAV\Sharing\Plugin as SPlugin;
@@ -11,8 +13,8 @@ use Sabre\DAV\Sharing\Plugin as SPlugin;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class SharedCalendar extends Calendar implements ISharedCalendar {
-
+class SharedCalendar extends Calendar implements ISharedCalendar
+{
/**
* Returns the 'access level' for the instance of this shared resource.
*
@@ -21,10 +23,9 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return int
*/
- function getShareAccess() {
-
+ public function getShareAccess()
+ {
return isset($this->calendarInfo['share-access']) ? $this->calendarInfo['share-access'] : SPlugin::ACCESS_NOTSHARED;
-
}
/**
@@ -38,10 +39,9 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return string
*/
- function getShareResourceUri() {
-
+ public function getShareResourceUri()
+ {
return $this->calendarInfo['share-resource-uri'];
-
}
/**
@@ -50,12 +50,10 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
* Every item must be a Sharee object.
*
* @param \Sabre\DAV\Xml\Element\Sharee[] $sharees
- * @return void
*/
- function updateInvites(array $sharees) {
-
+ public function updateInvites(array $sharees)
+ {
$this->caldavBackend->updateInvites($this->calendarInfo['id'], $sharees);
-
}
/**
@@ -74,10 +72,9 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return \Sabre\DAV\Xml\Element\Sharee[]
*/
- function getInvites() {
-
+ public function getInvites()
+ {
return $this->caldavBackend->getInvites($this->calendarInfo['id']);
-
}
/**
@@ -87,12 +84,10 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
* subscribable calendar.
*
* @param bool $value
- * @return void
*/
- function setPublishStatus($value) {
-
+ public function setPublishStatus($value)
+ {
$this->caldavBackend->setPublishStatus($this->calendarInfo['id'], $value);
-
}
/**
@@ -107,13 +102,13 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return array
*/
- function getACL() {
-
+ public function getACL()
+ {
$acl = [];
switch ($this->getShareAccess()) {
- case SPlugin::ACCESS_NOTSHARED :
- case SPlugin::ACCESS_SHAREDOWNER :
+ case SPlugin::ACCESS_NOTSHARED:
+ case SPlugin::ACCESS_SHAREDOWNER:
$acl[] = [
'privilege' => '{DAV:}share',
'principal' => $this->calendarInfo['principaluri'],
@@ -121,11 +116,11 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}share',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
- // No break intentional!
- case SPlugin::ACCESS_READWRITE :
+ // no break intentional!
+ case SPlugin::ACCESS_READWRITE:
$acl[] = [
'privilege' => '{DAV:}write',
'principal' => $this->calendarInfo['principaluri'],
@@ -133,11 +128,11 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}write',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
- // No break intentional!
- case SPlugin::ACCESS_READ :
+ // no break intentional!
+ case SPlugin::ACCESS_READ:
$acl[] = [
'privilege' => '{DAV:}write-properties',
'principal' => $this->calendarInfo['principaluri'],
@@ -145,7 +140,7 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}write-properties',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
$acl[] = [
@@ -155,26 +150,25 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-read',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-read',
'protected' => true,
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
$acl[] = [
- 'privilege' => '{' . Plugin::NS_CALDAV . '}read-free-busy',
+ 'privilege' => '{'.Plugin::NS_CALDAV.'}read-free-busy',
'principal' => '{DAV:}authenticated',
'protected' => true,
];
break;
}
- return $acl;
+ return $acl;
}
-
/**
* This method returns the ACL's for calendar objects in this calendar.
* The result of this method automatically gets passed to the
@@ -182,15 +176,13 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
*
* @return array
*/
- function getChildACL() {
-
+ public function getChildACL()
+ {
$acl = [];
switch ($this->getShareAccess()) {
- case SPlugin::ACCESS_NOTSHARED :
- // No break intentional
- case SPlugin::ACCESS_SHAREDOWNER :
- // No break intentional
+ case SPlugin::ACCESS_NOTSHARED:
+ case SPlugin::ACCESS_SHAREDOWNER:
case SPlugin::ACCESS_READWRITE:
$acl[] = [
'privilege' => '{DAV:}write',
@@ -199,10 +191,10 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}write',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
- // No break intentional
+ // no break intentional
case SPlugin::ACCESS_READ:
$acl[] = [
'privilege' => '{DAV:}read',
@@ -211,19 +203,17 @@ class SharedCalendar extends Calendar implements ISharedCalendar {
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-write',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-write',
'protected' => true,
];
$acl[] = [
'privilege' => '{DAV:}read',
- 'principal' => $this->calendarInfo['principaluri'] . '/calendar-proxy-read',
+ 'principal' => $this->calendarInfo['principaluri'].'/calendar-proxy-read',
'protected' => true,
];
break;
}
return $acl;
-
}
-
}