Skip to content

Commit 914a87c

Browse files
committed
Method "decodeRawNode" was compatible with Encoder.php
1 parent 2a3ab72 commit 914a87c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/PE/Encoders/XmlEncoder.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,26 @@ 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(\SimpleXMLElement $structure) {
38+
39+
/**
40+
* @param \SimpleXMLElement $structure
41+
* @return array
42+
*/
43+
protected function decodeChildNames($structure) {
3944
$names = array();
4045
foreach ($structure->children() as $child) {
4146
$names[] = $child->getName();
4247
}
4348
return $names;
4449
}
45-
protected function decodeRawNode(\SimpleXMLElement $nodeData, EncoderNode $nodeProxy, $isSingle) {
50+
51+
/**
52+
* @param \SimpleXMLElement $nodeData
53+
* @param EncoderNode $nodeProxy
54+
* @param $isSingle
55+
* @return mixed
56+
*/
57+
protected function decodeRawNode($nodeData, EncoderNode $nodeProxy, $isSingle) {
4658
$path = $nodeProxy->getNodeNameSingle();
4759
if (!$isSingle) {
4860
$path = $nodeProxy->getNodeName() . '/' . $path;

0 commit comments

Comments
 (0)