aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/xml/lib/Reader.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sabre/xml/lib/Reader.php')
-rw-r--r--vendor/sabre/xml/lib/Reader.php11
1 files changed, 4 insertions, 7 deletions
diff --git a/vendor/sabre/xml/lib/Reader.php b/vendor/sabre/xml/lib/Reader.php
index a28cf8c3b..37e0c86dd 100644
--- a/vendor/sabre/xml/lib/Reader.php
+++ b/vendor/sabre/xml/lib/Reader.php
@@ -118,7 +118,7 @@ class Reader extends XMLReader
* If the $elementMap argument is specified, the existing elementMap will
* be overridden while parsing the tree, and restored after this process.
*
- * @return array|string|null
+ * @return array|string
*/
public function parseInnerTree(array $elementMap = null)
{
@@ -147,9 +147,7 @@ class Reader extends XMLReader
throw new ParseException('This should never happen (famous last words)');
}
- $keepOnParsing = true;
-
- while ($keepOnParsing) {
+ while (true) {
if (!$this->isValid()) {
$errors = libxml_get_errors();
@@ -171,8 +169,7 @@ class Reader extends XMLReader
case self::END_ELEMENT:
// Ensuring we are moving the cursor after the end element.
$this->read();
- $keepOnParsing = false;
- break;
+ break 2;
case self::NONE:
throw new ParseException('We hit the end of the document prematurely. This likely means that some parser "eats" too many elements. Do not attempt to continue parsing.');
default:
@@ -226,7 +223,7 @@ class Reader extends XMLReader
}
$value = call_user_func(
- $this->getDeserializerForElementName((string) $name),
+ $this->getDeserializerForElementName($name),
$this
);