Code Duplication    Length = 3-5 lines in 2 locations

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

@@ 179-183 (lines=5) @@
176
        $root->appendChild($objectClass);
177
178
        $selectionType = $doc->createElement('selection_type');
179
        if (isset($fieldSettings['selectionMethod'])) {
180
            $selectionType->setAttribute('value', (int)$fieldSettings['selectionMethod']);
181
        } else {
182
            $selectionType->setAttribute('value', 0);
183
        }
184
        $root->appendChild($selectionType);
185
186
        $defaultLocation = $doc->createElement('contentobject-placement');
@@ 246-248 (lines=3) @@
243
            return;
244
        }
245
246
        if ($selectionType = $dom->getElementsByTagName('selection_type')) {
247
            $fieldSettings['selectionMethod'] = (int)$selectionType->item(0)->getAttribute('value');
248
        }
249
250
        if (
251
            ($defaultLocation = $dom->getElementsByTagName('contentobject-placement')) &&