From f1c07977809ce3221286d53e99f0d91145b1166f Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 25 Apr 2019 11:24:09 +0200 Subject: Revert "update composer libs" This reverts commit e779335d060b3a51d6a144d23af4097ae6801473 --- vendor/sabre/vobject/lib/Splitter/VCard.php | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'vendor/sabre/vobject/lib/Splitter/VCard.php') diff --git a/vendor/sabre/vobject/lib/Splitter/VCard.php b/vendor/sabre/vobject/lib/Splitter/VCard.php index a20f5c2c1..0bb82abe9 100644 --- a/vendor/sabre/vobject/lib/Splitter/VCard.php +++ b/vendor/sabre/vobject/lib/Splitter/VCard.php @@ -19,8 +19,8 @@ use Sabre\VObject\Parser\MimeDir; * @author Armin Hackmann * @license http://sabre.io/license/ Modified BSD License */ -class VCard implements SplitterInterface -{ +class VCard implements SplitterInterface { + /** * File handle. * @@ -38,15 +38,16 @@ class VCard implements SplitterInterface /** * Constructor. * - * The splitter should receive an readable file stream as its input. + * The splitter should receive an readable file stream as it's input. * * @param resource $input - * @param int $options parser options, see the OPTIONS constants + * @param int $options Parser options, see the OPTIONS constants. */ - public function __construct($input, $options = 0) - { + function __construct($input, $options = 0) { + $this->input = $input; $this->parser = new MimeDir($input, $options); + } /** @@ -55,20 +56,23 @@ class VCard implements SplitterInterface * * When the end is reached, null will be returned. * - * @return \Sabre\VObject\Component|null + * @return Sabre\VObject\Component|null */ - public function getNext() - { + function getNext() { + try { $object = $this->parser->parse(); if (!$object instanceof VObject\Component\VCard) { throw new VObject\ParseException('The supplied input contained non-VCARD data.'); } + } catch (VObject\EofException $e) { return; } return $object; + } + } -- cgit v1.2.3