Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit d274cf0

Browse files
samsonasikmichalbundyra
authored andcommitted
count() optimization
1 parent 9f6e235 commit d274cf0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Xml2Json.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ protected static function processXml($simpleXmlElementObject, $ignoreXmlAttribut
127127
$value = static::getXmlValue($simpleXmlElementObject);
128128
$attributes = (array) $simpleXmlElementObject->attributes();
129129

130-
if (! count($children)) {
130+
if (! $children) {
131131
if (! empty($attributes) && ! $ignoreXmlAttributes) {
132132
foreach ($attributes['@attributes'] as $k => $v) {
133133
$attributes['@attributes'][$k] = static::getXmlValue($v);

0 commit comments

Comments
 (0)