Code Duplication    Length = 3-5 lines in 2 locations

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

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