Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 1317-1323 (lines=7) @@
1314
    public function createModelQueryParams($model, $query_params)
1315
    {
1316
        $model_query_params = array();
1317
        if (isset($query_params['where'])) {
1318
            $model_query_params[0] = ModelDataTranslator::prepareConditionsQueryParamsForModels(
1319
                $query_params['where'],
1320
                $model,
1321
                $this->getModelVersionInfo()->requestedVersion()
1322
            );
1323
        }
1324
        if (isset($query_params['order_by'])) {
1325
            $order_by = $query_params['order_by'];
1326
        } elseif (isset($query_params['orderby'])) {
@@ 1354-1360 (lines=7) @@
1351
        if ($group_by !== null) {
1352
            $model_query_params['group_by'] = $group_by;
1353
        }
1354
        if (isset($query_params['having'])) {
1355
            $model_query_params['having'] = ModelDataTranslator::prepareConditionsQueryParamsForModels(
1356
                $query_params['having'],
1357
                $model,
1358
                $this->getModelVersionInfo()->requestedVersion()
1359
            );
1360
        }
1361
        if (isset($query_params['order'])) {
1362
            $model_query_params['order'] = $query_params['order'];
1363
        }