Code Duplication    Length = 5-5 lines in 2 locations

lib/PhpParser/Serializer/XML.php 2 locations

@@ 44-48 (lines=5) @@
41
        if ($node instanceof Node) {
42
            $this->writer->startElement('node:' . $node->getType());
43
44
            foreach ($node->getAttributes() as $name => $value) {
45
                $this->writer->startElement('attribute:' . $name);
46
                $this->_serialize($value);
47
                $this->writer->endElement();
48
            }
49
50
            foreach ($node as $name => $subNode) {
51
                $this->writer->startElement('subNode:' . $name);
@@ 50-54 (lines=5) @@
47
                $this->writer->endElement();
48
            }
49
50
            foreach ($node as $name => $subNode) {
51
                $this->writer->startElement('subNode:' . $name);
52
                $this->_serialize($subNode);
53
                $this->writer->endElement();
54
            }
55
56
            $this->writer->endElement();
57
        } elseif ($node instanceof Comment) {