Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 175-181 (lines=7) @@
172
        if (isset($schema['properties'][$field_name]['default'])) {
173
            if (is_array($schema['properties'][$field_name]['default'])) {
174
                foreach ($schema['properties'][$field_name]['default'] as $default_key => $default_value) {
175
                    if ($default_key === 'raw') {
176
                        $schema['properties'][$field_name]['default'][$default_key] =
177
                            ModelDataTranslator::prepareFieldValueForJson(
178
                                $field,
179
                                $default_value,
180
                                $this->getModelVersionInfo()->requestedVersion()
181
                            );
182
                    }
183
                }
184
            } else {
@@ 184-190 (lines=7) @@
181
                            );
182
                    }
183
                }
184
            } else {
185
                $schema['properties'][$field_name]['default'] = ModelDataTranslator::prepareFieldValueForJson(
186
                    $field,
187
                    $schema['properties'][$field_name]['default'],
188
                    $this->getModelVersionInfo()->requestedVersion()
189
                );
190
            }
191
        }
192
        return $schema;
193
    }