Code Duplication    Length = 9-9 lines in 2 locations

core/libraries/rest_api/Model_Data_Translator.php 1 location

@@ 136-144 (lines=9) @@
133
		return $query_param_for_models;
134
	}
135
	
136
	public static function remove_stars_and_anything_after_from_condition_query_param_key( $condition_query_param_key ) {
137
		$pos_of_star = strpos($condition_query_param_key, '*');
138
		if($pos_of_star === FALSE){
139
			return $condition_query_param_key;
140
		}else{
141
			$condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
142
			return $condition_query_param_sans_star;
143
		}
144
	}
145
	
146
	/**
147
	 * Takes the input parameter and finds the model field that it indicates.

core/db_models/EEM_Base.model.php 1 location

@@ 3434-3442 (lines=9) @@
3431
	 * @param string $condition_query_param_key
3432
	 * @return string
3433
	 */
3434
	private function _remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key){
3435
		$pos_of_star = strpos($condition_query_param_key, '*');
3436
		if($pos_of_star === FALSE){
3437
			return $condition_query_param_key;
3438
		}else{
3439
			$condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
3440
			return $condition_query_param_sans_star;
3441
		}
3442
	}
3443
3444
3445