diff options
author | zotlabs <mike@macgirvin.com> | 2019-04-28 17:47:26 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-04-28 17:47:26 -0700 |
commit | 95871fe13c3a9515d82510997a734bf7e8945bad (patch) | |
tree | e6974fb15bac5844220287c94755f203dc403829 /vendor/sabre/vobject/lib/Splitter/ICalendar.php | |
parent | 9536a490b3fc5fc02a6d0a79275e8df03ee8156b (diff) | |
parent | 0cecfceb14083141da389b7cc1e413ba5d5ca6d7 (diff) | |
download | volse-hubzilla-95871fe13c3a9515d82510997a734bf7e8945bad.tar.gz volse-hubzilla-95871fe13c3a9515d82510997a734bf7e8945bad.tar.bz2 volse-hubzilla-95871fe13c3a9515d82510997a734bf7e8945bad.zip |
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'vendor/sabre/vobject/lib/Splitter/ICalendar.php')
-rw-r--r-- | vendor/sabre/vobject/lib/Splitter/ICalendar.php | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/vendor/sabre/vobject/lib/Splitter/ICalendar.php b/vendor/sabre/vobject/lib/Splitter/ICalendar.php index c0007ba01..d42566194 100644 --- a/vendor/sabre/vobject/lib/Splitter/ICalendar.php +++ b/vendor/sabre/vobject/lib/Splitter/ICalendar.php @@ -19,8 +19,8 @@ use Sabre\VObject\Component\VCalendar; * @author Armin Hackmann * @license http://sabre.io/license/ Modified BSD License */ -class ICalendar implements SplitterInterface { - +class ICalendar implements SplitterInterface +{ /** * Timezones. * @@ -38,13 +38,13 @@ class ICalendar implements SplitterInterface { /** * Constructor. * - * The splitter should receive an readable file stream as it's input. + * The splitter should receive an readable file stream as its input. * * @param resource $input - * @param int $options Parser options, see the OPTIONS constants. + * @param int $options parser options, see the OPTIONS constants */ - function __construct($input, $options = 0) { - + public function __construct($input, $options = 0) + { $data = VObject\Reader::read($input, $options); if (!$data instanceof VObject\Component\VCalendar) { @@ -57,16 +57,16 @@ class ICalendar implements SplitterInterface { } // Get all timezones - if ($component->name === 'VTIMEZONE') { - $this->vtimezones[(string)$component->TZID] = $component; + if ('VTIMEZONE' === $component->name) { + $this->vtimezones[(string) $component->TZID] = $component; continue; } // Get component UID for recurring Events search if (!$component->UID) { - $component->UID = sha1(microtime()) . '-vobjectimport'; + $component->UID = sha1(microtime()).'-vobjectimport'; } - $uid = (string)$component->UID; + $uid = (string) $component->UID; // Take care of recurring events if (!array_key_exists($uid, $this->objects)) { @@ -75,7 +75,6 @@ class ICalendar implements SplitterInterface { $this->objects[$uid]->add(clone $component); } - } /** @@ -84,15 +83,14 @@ class ICalendar implements SplitterInterface { * * When the end is reached, null will be returned. * - * @return Sabre\VObject\Component|null + * @return \Sabre\VObject\Component|null */ - function getNext() { - + public function getNext() + { if ($object = array_shift($this->objects)) { - // create our baseobject $object->version = '2.0'; - $object->prodid = '-//Sabre//Sabre VObject ' . VObject\Version::VERSION . '//EN'; + $object->prodid = '-//Sabre//Sabre VObject '.VObject\Version::VERSION.'//EN'; $object->calscale = 'GREGORIAN'; // add vtimezone information to obj (if we have it) @@ -101,13 +99,8 @@ class ICalendar implements SplitterInterface { } return $object; - } else { - return; - } - } - } |