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

@@ 3396-3404 (lines=9) @@
3393
	 * @param string $condition_query_param_key
3394
	 * @return string
3395
	 */
3396
	private function _remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key){
3397
		$pos_of_star = strpos($condition_query_param_key, '*');
3398
		if($pos_of_star === FALSE){
3399
			return $condition_query_param_key;
3400
		}else{
3401
			$condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
3402
			return $condition_query_param_sans_star;
3403
		}
3404
	}
3405
3406
3407