Code Duplication    Length = 6-6 lines in 2 locations

eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/RelationConverter.php 1 location

@@ 153-158 (lines=6) @@
150
            return;
151
        }
152
153
        if (
154
            ($selectionType = $dom->getElementsByTagName('selection_type')->item(0)) &&
155
            $selectionType->hasAttribute('value')
156
        ) {
157
            $fieldSettings['selectionMethod'] = (int)$selectionType->getAttribute('value');
158
        }
159
160
        if (
161
            ($defaultLocation = $dom->getElementsByTagName('contentobject-placement')->item(0)) &&

eZ/Publish/Core/Persistence/Legacy/Content/FieldValue/Converter/RelationListConverter.php 1 location

@@ 229-234 (lines=6) @@
226
227
        // read settings from storage
228
        $fieldSettings = &$fieldDef->fieldTypeConstraints->fieldSettings;
229
        if (
230
            ($selectionType = $dom->getElementsByTagName('selection_type')->item(0)) &&
231
            $selectionType->hasAttribute('value')
232
        ) {
233
            $fieldSettings['selectionMethod'] = (int)$selectionType->getAttribute('value');
234
        }
235
236
        if (
237
            ($defaultLocation = $dom->getElementsByTagName('contentobject-placement')->item(0)) &&