Skip to content

Commit 7cfec09

Browse files
committed
Achieved full coverage. Great success!
1 parent 873e082 commit 7cfec09

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/PE/encoders/XmlEncoder.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function decode($node, EncoderOptions $options = null) {
3535
$node = is_string($node) ? simplexml_load_string($node) : $node;
3636
return parent::decode($node, $options);
3737
}
38-
protected function decodeChildNames($structure) {
38+
protected function decodeChildNames(\SimpleXMLElement $structure) {
3939
$names = array();
4040
foreach ($structure->children() as $child) {
4141
$names[] = $child->getName();
@@ -48,10 +48,6 @@ protected function decodeRawNode(\SimpleXMLElement $nodeData, EncoderNode $nodeP
4848
$path = $nodeProxy->getNodeName() . '/' . $path;
4949
}
5050
$children = $nodeData->xpath($path);
51-
if ($isSingle && count($children) == 0) {
52-
throw new EncoderException(sprintf('There are no children found in node %s', ($isSingle ? $nodeProxy->getNodeNameSingle() : $nodeProxy->getNodeName())));
53-
}
54-
5551
return ($isSingle ? $children[0] : $children);
5652
}
5753
protected function decodeNode($nodeData) {

0 commit comments

Comments
 (0)