diff options
author | Mario <mario@mariovavti.com> | 2019-04-25 11:24:09 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-04-25 11:24:09 +0200 |
commit | f1c07977809ce3221286d53e99f0d91145b1166f (patch) | |
tree | 4c067a3b701ea56f10070c386b26a30f93666eb0 /vendor/sabre/vobject/lib/Component/VJournal.php | |
parent | 701167bc125700efb3e6ce759b85bcb4d36ee42e (diff) | |
download | volse-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/VJournal.php')
-rw-r--r-- | vendor/sabre/vobject/lib/Component/VJournal.php | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/vendor/sabre/vobject/lib/Component/VJournal.php b/vendor/sabre/vobject/lib/Component/VJournal.php index 9bd336776..a1b1a863d 100644 --- a/vendor/sabre/vobject/lib/Component/VJournal.php +++ b/vendor/sabre/vobject/lib/Component/VJournal.php @@ -14,8 +14,8 @@ use Sabre\VObject; * @author Evert Pot (http://evertpot.com/) * @license http://sabre.io/license/ Modified BSD License */ -class VJournal extends VObject\Component -{ +class VJournal extends VObject\Component { + /** * Returns true or false depending on if the event falls in the specified * time-range. This is used for filtering purposes. @@ -28,8 +28,8 @@ class VJournal extends VObject\Component * * @return bool */ - public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) - { + function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) { + $dtstart = isset($this->DTSTART) ? $this->DTSTART->getDateTime() : null; if ($dtstart) { $effectiveEnd = $dtstart; @@ -37,10 +37,11 @@ class VJournal extends VObject\Component $effectiveEnd = $effectiveEnd->modify('+1 day'); } - return $start <= $effectiveEnd && $end > $dtstart; - } + return ($start <= $effectiveEnd && $end > $dtstart); + } return false; + } /** @@ -58,35 +59,36 @@ class VJournal extends VObject\Component * * @var array */ - public function getValidationRules() - { + function getValidationRules() { + return [ - 'UID' => 1, + 'UID' => 1, 'DTSTAMP' => 1, - 'CLASS' => '?', - 'CREATED' => '?', - 'DTSTART' => '?', + 'CLASS' => '?', + 'CREATED' => '?', + 'DTSTART' => '?', 'LAST-MODIFIED' => '?', - 'ORGANIZER' => '?', + 'ORGANIZER' => '?', 'RECURRENCE-ID' => '?', - 'SEQUENCE' => '?', - 'STATUS' => '?', - 'SUMMARY' => '?', - 'URL' => '?', + 'SEQUENCE' => '?', + 'STATUS' => '?', + 'SUMMARY' => '?', + 'URL' => '?', 'RRULE' => '?', - 'ATTACH' => '*', - 'ATTENDEE' => '*', - 'CATEGORIES' => '*', - 'COMMENT' => '*', - 'CONTACT' => '*', + 'ATTACH' => '*', + 'ATTENDEE' => '*', + 'CATEGORIES' => '*', + 'COMMENT' => '*', + 'CONTACT' => '*', 'DESCRIPTION' => '*', - 'EXDATE' => '*', - 'RELATED-TO' => '*', - 'RDATE' => '*', + 'EXDATE' => '*', + 'RELATED-TO' => '*', + 'RDATE' => '*', ]; + } /** @@ -94,11 +96,12 @@ class VJournal extends VObject\Component * * @return array */ - protected function getDefaults() - { + protected function getDefaults() { + return [ - 'UID' => 'sabre-vobject-'.VObject\UUIDUtil::getUUID(), - 'DTSTAMP' => gmdate('Ymd\\THis\\Z'), + 'UID' => 'sabre-vobject-' . VObject\UUIDUtil::getUUID(), + 'DTSTAMP' => date('Ymd\\THis\\Z'), ]; + } } |