aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Component/VFreeBusy.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-04-25 11:24:09 +0200
committerMario <mario@mariovavti.com>2019-04-25 11:24:09 +0200
commitf1c07977809ce3221286d53e99f0d91145b1166f (patch)
tree4c067a3b701ea56f10070c386b26a30f93666eb0 /vendor/sabre/vobject/lib/Component/VFreeBusy.php
parent701167bc125700efb3e6ce759b85bcb4d36ee42e (diff)
downloadvolse-hubzilla-f1c07977809ce3221286d53e99f0d91145b1166f.tar.gz
volse-hubzilla-f1c07977809ce3221286d53e99f0d91145b1166f.tar.bz2
volse-hubzilla-f1c07977809ce3221286d53e99f0d91145b1166f.zip
Revert "update composer libs"
This reverts commit e779335d060b3a51d6a144d23af4097ae6801473
Diffstat (limited to 'vendor/sabre/vobject/lib/Component/VFreeBusy.php')
-rw-r--r--vendor/sabre/vobject/lib/Component/VFreeBusy.php38
1 files changed, 22 insertions, 16 deletions
diff --git a/vendor/sabre/vobject/lib/Component/VFreeBusy.php b/vendor/sabre/vobject/lib/Component/VFreeBusy.php
index 558a85233..72294cc9f 100644
--- a/vendor/sabre/vobject/lib/Component/VFreeBusy.php
+++ b/vendor/sabre/vobject/lib/Component/VFreeBusy.php
@@ -15,8 +15,8 @@ use Sabre\VObject;
* @author Evert Pot (http://evertpot.com/)
* @license http://sabre.io/license/ Modified BSD License
*/
-class VFreeBusy extends VObject\Component
-{
+class VFreeBusy extends VObject\Component {
+
/**
* Checks based on the contained FREEBUSY information, if a timeslot is
* available.
@@ -26,18 +26,19 @@ class VFreeBusy extends VObject\Component
*
* @return bool
*/
- public function isFree(DateTimeInterface $start, DatetimeInterface $end)
- {
+ function isFree(DateTimeInterface $start, DatetimeInterface $end) {
+
foreach ($this->select('FREEBUSY') as $freebusy) {
+
// We are only interested in FBTYPE=BUSY (the default),
// FBTYPE=BUSY-TENTATIVE or FBTYPE=BUSY-UNAVAILABLE.
- if (isset($freebusy['FBTYPE']) && 'BUSY' !== strtoupper(substr((string) $freebusy['FBTYPE'], 0, 4))) {
+ if (isset($freebusy['FBTYPE']) && strtoupper(substr((string)$freebusy['FBTYPE'], 0, 4)) !== 'BUSY') {
continue;
}
// The freebusy component can hold more than 1 value, separated by
// commas.
- $periods = explode(',', (string) $freebusy);
+ $periods = explode(',', (string)$freebusy);
foreach ($periods as $period) {
// Every period is formatted as [start]/[end]. The start is an
@@ -54,10 +55,13 @@ class VFreeBusy extends VObject\Component
if ($start < $busyEnd && $end > $busyStart) {
return false;
}
+
}
+
}
return true;
+
}
/**
@@ -75,22 +79,24 @@ class VFreeBusy extends VObject\Component
*
* @var array
*/
- public function getValidationRules()
- {
+ function getValidationRules() {
+
return [
- 'UID' => 1,
+ 'UID' => 1,
'DTSTAMP' => 1,
- 'CONTACT' => '?',
- 'DTSTART' => '?',
- 'DTEND' => '?',
+ 'CONTACT' => '?',
+ 'DTSTART' => '?',
+ 'DTEND' => '?',
'ORGANIZER' => '?',
- 'URL' => '?',
+ 'URL' => '?',
- 'ATTENDEE' => '*',
- 'COMMENT' => '*',
- 'FREEBUSY' => '*',
+ 'ATTENDEE' => '*',
+ 'COMMENT' => '*',
+ 'FREEBUSY' => '*',
'REQUEST-STATUS' => '*',
];
+
}
+
}