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/VAvailability.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/VAvailability.php')
-rw-r--r-- | vendor/sabre/vobject/lib/Component/VAvailability.php | 64 |
1 files changed, 34 insertions, 30 deletions
diff --git a/vendor/sabre/vobject/lib/Component/VAvailability.php b/vendor/sabre/vobject/lib/Component/VAvailability.php index 6f3e7f13c..66b3310c5 100644 --- a/vendor/sabre/vobject/lib/Component/VAvailability.php +++ b/vendor/sabre/vobject/lib/Component/VAvailability.php @@ -15,8 +15,8 @@ use Sabre\VObject; * @author Ivan Enderlin * @license http://sabre.io/license/ Modified BSD License */ -class VAvailability extends VObject\Component -{ +class VAvailability extends VObject\Component { + /** * Returns true or false depending on if the event falls in the specified * time-range. This is used for filtering purposes. @@ -31,14 +31,14 @@ class VAvailability extends VObject\Component * * @return bool */ - public function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) - { - list($effectiveStart, $effectiveEnd) = $this->getEffectiveStartEnd(); + function isInTimeRange(DateTimeInterface $start, DateTimeInterface $end) { - return + list($effectiveStart, $effectiveEnd) = $this->getEffectiveStartEnd(); + return ( (is_null($effectiveStart) || $start < $effectiveEnd) && (is_null($effectiveEnd) || $end > $effectiveStart) - ; + ); + } /** @@ -53,8 +53,8 @@ class VAvailability extends VObject\Component * * @return array */ - public function getEffectiveStartEnd() - { + function getEffectiveStartEnd() { + $effectiveStart = null; $effectiveEnd = null; @@ -68,8 +68,10 @@ class VAvailability extends VObject\Component } return [$effectiveStart, $effectiveEnd]; + } + /** * A simple list of validation rules. * @@ -85,30 +87,31 @@ class VAvailability extends VObject\Component * * @var array */ - public function getValidationRules() - { + function getValidationRules() { + return [ - 'UID' => 1, + 'UID' => 1, 'DTSTAMP' => 1, - 'BUSYTYPE' => '?', - 'CLASS' => '?', - 'CREATED' => '?', - 'DESCRIPTION' => '?', - 'DTSTART' => '?', + 'BUSYTYPE' => '?', + 'CLASS' => '?', + 'CREATED' => '?', + 'DESCRIPTION' => '?', + 'DTSTART' => '?', 'LAST-MODIFIED' => '?', - 'ORGANIZER' => '?', - 'PRIORITY' => '?', - 'SEQUENCE' => '?', - 'SUMMARY' => '?', - 'URL' => '?', - 'DTEND' => '?', - 'DURATION' => '?', + 'ORGANIZER' => '?', + 'PRIORITY' => '?', + 'SEQUENCE' => '?', + 'SUMMARY' => '?', + 'URL' => '?', + 'DTEND' => '?', + 'DURATION' => '?', 'CATEGORIES' => '*', - 'COMMENT' => '*', - 'CONTACT' => '*', + 'COMMENT' => '*', + 'CONTACT' => '*', ]; + } /** @@ -135,18 +138,19 @@ class VAvailability extends VObject\Component * * @return array */ - public function validate($options = 0) - { + function validate($options = 0) { + $result = parent::validate($options); if (isset($this->DTEND) && isset($this->DURATION)) { $result[] = [ - 'level' => 3, + 'level' => 3, 'message' => 'DTEND and DURATION cannot both be present', - 'node' => $this, + 'node' => $this ]; } return $result; + } } |