aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/Parser/XML
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2019-04-25 11:47:18 +0200
committerMario Vavti <mario@mariovavti.com>2019-04-25 11:47:18 +0200
commita60c2f38c689f254bd8bb8e7ea9af78bf21c1f84 (patch)
tree65d1d73918ccb1d4ccc36184d70af2e8dd91f28e /vendor/sabre/vobject/lib/Parser/XML
parentf1c07977809ce3221286d53e99f0d91145b1166f (diff)
downloadvolse-hubzilla-a60c2f38c689f254bd8bb8e7ea9af78bf21c1f84.tar.gz
volse-hubzilla-a60c2f38c689f254bd8bb8e7ea9af78bf21c1f84.tar.bz2
volse-hubzilla-a60c2f38c689f254bd8bb8e7ea9af78bf21c1f84.zip
update sabre/vobject
Diffstat (limited to 'vendor/sabre/vobject/lib/Parser/XML')
-rw-r--r--vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php b/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php
index 14d798433..e26540036 100644
--- a/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php
+++ b/vendor/sabre/vobject/lib/Parser/XML/Element/KeyValue.php
@@ -13,8 +13,8 @@ use Sabre\Xml as SabreXml;
* @author Ivan Enderlin
* @license http://sabre.io/license/ Modified BSD License
*/
-class KeyValue extends SabreXml\Element\KeyValue {
-
+class KeyValue extends SabreXml\Element\KeyValue
+{
/**
* The deserialize method is called during xml parsing.
*
@@ -37,11 +37,12 @@ class KeyValue extends SabreXml\Element\KeyValue {
*
* @return mixed
*/
- static function xmlDeserialize(SabreXml\Reader $reader) {
-
+ public static function xmlDeserialize(SabreXml\Reader $reader)
+ {
// If there's no children, we don't do anything.
if ($reader->isEmptyElement) {
$reader->next();
+
return [];
}
@@ -49,22 +50,16 @@ class KeyValue extends SabreXml\Element\KeyValue {
$reader->read();
do {
-
- if ($reader->nodeType === SabreXml\Reader::ELEMENT) {
-
+ if (SabreXml\Reader::ELEMENT === $reader->nodeType) {
$name = $reader->localName;
$values[$name] = $reader->parseCurrentElement()['value'];
-
} else {
$reader->read();
}
-
- } while ($reader->nodeType !== SabreXml\Reader::END_ELEMENT);
+ } while (SabreXml\Reader::END_ELEMENT !== $reader->nodeType);
$reader->read();
return $values;
-
}
-
}