Code Duplication    Length = 9-9 lines in 2 locations

core/libraries/rest_api/Model_Data_Translator.php 1 location

@@ 225-233 (lines=9) @@
222
		return $query_param_for_models;
223
	}
224
	
225
	public static function remove_stars_and_anything_after_from_condition_query_param_key( $condition_query_param_key ) {
226
		$pos_of_star = strpos($condition_query_param_key, '*');
227
		if($pos_of_star === FALSE){
228
			return $condition_query_param_key;
229
		}else{
230
			$condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
231
			return $condition_query_param_sans_star;
232
		}
233
	}
234
	
235
	/**
236
	 * Takes the input parameter and finds the model field that it indicates.

core/db_models/EEM_Base.model.php 1 location

@@ 3447-3455 (lines=9) @@
3444
	 * @param string $condition_query_param_key
3445
	 * @return string
3446
	 */
3447
	private function _remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key){
3448
		$pos_of_star = strpos($condition_query_param_key, '*');
3449
		if($pos_of_star === FALSE){
3450
			return $condition_query_param_key;
3451
		}else{
3452
			$condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
3453
			return $condition_query_param_sans_star;
3454
		}
3455
	}
3456
3457
3458