Code Duplication    Length = 7-7 lines in 2 locations

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

@@ 577-583 (lines=7) @@
574
		if ( isset( $query_parameters[ 'where' ] ) ) {
575
			$model_query_params[ 0 ] = $this->prepare_rest_query_params_key_for_models( $model, $query_parameters[ 'where' ] );
576
		}
577
		if ( isset( $query_parameters[ 'order_by' ] ) ) {
578
			$order_by = $query_parameters[ 'order_by' ];
579
		} elseif ( isset( $query_parameters[ 'orderby' ] ) ) {
580
			$order_by = $query_parameters[ 'orderby' ];
581
		}else{
582
			$order_by = null;
583
		}
584
		if( $order_by !== null ){
585
			$model_query_params[ 'order_by' ] = $this->prepare_rest_query_params_key_for_models( $model, $order_by );
586
		}
@@ 587-593 (lines=7) @@
584
		if( $order_by !== null ){
585
			$model_query_params[ 'order_by' ] = $this->prepare_rest_query_params_key_for_models( $model, $order_by );
586
		}
587
		if ( isset( $query_parameters[ 'group_by' ] ) ) {
588
			$group_by = $query_parameters[ 'group_by' ];
589
		} elseif ( isset( $query_parameters[ 'groupby' ] ) ) {
590
			$group_by = $query_parameters[ 'groupby' ];
591
		}else{
592
			$group_by = null;
593
		}
594
		if( $group_by !== null ){
595
			if( is_array( $group_by ) ) {
596
				$group_by = $this->prepare_rest_query_params_values_for_models( $model, $group_by );