Code Duplication    Length = 9-10 lines in 2 locations

core/db_models/EEM_Base.model.php 1 location

@@ 4279-4287 (lines=9) @@
4276
     * @param string $condition_query_param_key
4277
     * @return string
4278
     */
4279
    private function _remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key)
4280
    {
4281
        $pos_of_star = strpos($condition_query_param_key, '*');
4282
        if ($pos_of_star === false) {
4283
            return $condition_query_param_key;
4284
        }
4285
        $condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
4286
        return $condition_query_param_sans_star;
4287
    }
4288
4289
4290

core/libraries/rest_api/ModelDataTranslator.php 1 location

@@ 806-815 (lines=10) @@
803
     * @param $condition_query_param_key
804
     * @return string
805
     */
806
    public static function removeStarsAndAnythingAfterFromConditionQueryParamKey($condition_query_param_key)
807
    {
808
        $pos_of_star = strpos($condition_query_param_key, '*');
809
        if ($pos_of_star === false) {
810
            return $condition_query_param_key;
811
        } else {
812
            $condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
813
            return $condition_query_param_sans_star;
814
        }
815
    }
816
817
818