Code Duplication    Length = 9-9 lines in 2 locations

core/libraries/rest_api/Model_Data_Translator.php 1 location

@@ 504-512 (lines=9) @@
501
     * @param $condition_query_param_key
502
     * @return string
503
     */
504
    public static function remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key)
505
    {
506
        $pos_of_star = strpos($condition_query_param_key, '*');
507
        if ($pos_of_star === false) {
508
            return $condition_query_param_key;
509
        } else {
510
            $condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
511
            return $condition_query_param_sans_star;
512
        }
513
    }
514
515

core/db_models/EEM_Base.model.php 1 location

@@ 4168-4176 (lines=9) @@
4165
     * @param string $condition_query_param_key
4166
     * @return string
4167
     */
4168
    private function _remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key)
4169
    {
4170
        $pos_of_star = strpos($condition_query_param_key, '*');
4171
        if ($pos_of_star === false) {
4172
            return $condition_query_param_key;
4173
        }
4174
        $condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
4175
        return $condition_query_param_sans_star;
4176
    }
4177
4178
4179