From f132436af3c90cff8dcef852bd836546311036f3 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 7 May 2020 21:48:26 +0000 Subject: composer updates 2 --- vendor/sabre/xml/lib/Serializer/functions.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'vendor/sabre/xml/lib/Serializer/functions.php') diff --git a/vendor/sabre/xml/lib/Serializer/functions.php b/vendor/sabre/xml/lib/Serializer/functions.php index 3694d9791..8d0330558 100644 --- a/vendor/sabre/xml/lib/Serializer/functions.php +++ b/vendor/sabre/xml/lib/Serializer/functions.php @@ -148,7 +148,7 @@ function repeatingElements(Writer $writer, array $items, string $childElementNam * * You can even mix the two array syntaxes. * - * @param string|int|float|bool|array|object + * @param string|int|float|bool|array|object $value */ function standardSerializer(Writer $writer, $value) { @@ -164,8 +164,6 @@ function standardSerializer(Writer $writer, $value) } elseif (is_callable($value)) { // A callback $value($writer); - } elseif (is_null($value)) { - // nothing! } elseif (is_array($value) && array_key_exists('name', $value)) { // if the array had a 'name' element, we assume that this array // describes a 'name' and optionally 'attributes' and 'value'. @@ -204,7 +202,7 @@ function standardSerializer(Writer $writer, $value) } } elseif (is_object($value)) { throw new InvalidArgumentException('The writer cannot serialize objects of class: '.get_class($value)); - } else { + } elseif (!is_null($value)) { throw new InvalidArgumentException('The writer cannot serialize values of type: '.gettype($value)); } } -- cgit v1.2.3