Code Duplication    Length = 7-7 lines in 2 locations

core/libraries/rest_api/controllers/model/Read.php 2 locations

@@ 191-197 (lines=7) @@
188
        if (isset($schema['properties'][ $field_name ]['default'])) {
189
            if (is_array($schema['properties'][ $field_name ]['default'])) {
190
                foreach ($schema['properties'][ $field_name ]['default'] as $default_key => $default_value) {
191
                    if ($default_key === 'raw') {
192
                        $schema['properties'][ $field_name ]['default'][ $default_key ] =
193
                            ModelDataTranslator::prepareFieldValueForJson(
194
                                $field,
195
                                $default_value,
196
                                $this->getModelVersionInfo()->requestedVersion()
197
                            );
198
                    }
199
                }
200
            } else {
@@ 200-206 (lines=7) @@
197
                            );
198
                    }
199
                }
200
            } else {
201
                $schema['properties'][ $field_name ]['default'] = ModelDataTranslator::prepareFieldValueForJson(
202
                    $field,
203
                    $schema['properties'][ $field_name ]['default'],
204
                    $this->getModelVersionInfo()->requestedVersion()
205
                );
206
            }
207
        }
208
        return $schema;
209
    }