Code Duplication    Length = 3-5 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php 2 locations

@@ 144-148 (lines=5) @@
141
        $root->appendChild($objectClass);
142
143
        $selectionType = $doc->createElement('selection_type');
144
        if (isset($fieldSettings['selectionMethod'])) {
145
            $selectionType->setAttribute('value', (int)$fieldSettings['selectionMethod']);
146
        } else {
147
            $selectionType->setAttribute('value', 0);
148
        }
149
        $root->appendChild($selectionType);
150
151
        $defaultLocation = $doc->createElement('contentobject-placement');
@@ 211-213 (lines=3) @@
208
            return;
209
        }
210
211
        if ($selectionType = $dom->getElementsByTagName('selection_type')) {
212
            $fieldSettings['selectionMethod'] = (int)$selectionType->item(0)->getAttribute('value');
213
        }
214
215
        if (
216
            ($defaultLocation = $dom->getElementsByTagName('contentobject-placement')) &&