Code Duplication    Length = 13-16 lines in 2 locations

src/Jms/Handler/BaseTypesHandler.php 2 locations

@@ 31-46 (lines=16) @@
28
        );
29
    }
30
31
    public function simpleListOfToXml(XmlSerializationVisitor $visitor, $object, array $type, Context $context)
32
    {
33
34
        $newType = array(
35
            'name' => $type["params"][0]["name"],
36
            'params' => array()
37
        );
38
39
        $navigator = $context->getNavigator();
40
        $ret = array();
41
        foreach ($object as $v) {
42
            $ret[] = $navigator->accept($v, $newType, $context)->data;
43
        }
44
45
        return $visitor->getDocument()->createTextNode(implode(" ", $ret));
46
    }
47
48
    public function simpleListOfFromXml(XmlDeserializationVisitor $visitor, $node, array $type, Context $context)
49
    {
@@ 48-60 (lines=13) @@
45
        return $visitor->getDocument()->createTextNode(implode(" ", $ret));
46
    }
47
48
    public function simpleListOfFromXml(XmlDeserializationVisitor $visitor, $node, array $type, Context $context)
49
    {
50
        $newType = array(
51
            'name' => $type["params"][0]["name"],
52
            'params' => array()
53
        );
54
        $ret = array();
55
        $navigator = $context->getNavigator();
56
        foreach (explode(" ", (string)$node) as $v) {
57
            $ret[] = $navigator->accept($v, $newType, $context);
58
        }
59
        return $ret;
60
    }
61
}
62
63