Code Duplication    Length = 11-11 lines in 2 locations

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

@@ 650-660 (lines=11) @@
647
	 * @param array     $query_params sub-array from @see EEM_Base::get_all()
648
	 * @return array
649
	 */
650
	public function prepare_rest_query_params_key_for_models( $model,  $query_params ) {
651
		$model_ready_query_params = array();
652
		foreach( $query_params as $key => $value ) {
653
			if( is_array( $value ) ) {
654
				$model_ready_query_params[ $key ] = $this->prepare_rest_query_params_key_for_models( $model, $value );
655
			}else{
656
				$model_ready_query_params[ $key ] = $value;
657
			}
658
		}
659
		return $model_ready_query_params;
660
	}
661
	public function prepare_rest_query_params_values_for_models( $model,  $query_params ) {
662
		$model_ready_query_params = array();
663
		foreach( $query_params as $key => $value ) {
@@ 661-671 (lines=11) @@
658
		}
659
		return $model_ready_query_params;
660
	}
661
	public function prepare_rest_query_params_values_for_models( $model,  $query_params ) {
662
		$model_ready_query_params = array();
663
		foreach( $query_params as $key => $value ) {
664
			if( is_array( $value ) ) {
665
				$model_ready_query_params[ $key ] = $this->prepare_rest_query_params_values_for_models( $model, $value );
666
			} else {
667
				$model_ready_query_params[ $key ] = $value;
668
			}
669
		}
670
		return $model_ready_query_params;
671
	}
672
673
674
	/**