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

@@ 4103-4111 (lines=9) @@
4100
     * @param string $condition_query_param_key
4101
     * @return string
4102
     */
4103
    private function _remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key)
4104
    {
4105
        $pos_of_star = strpos($condition_query_param_key, '*');
4106
        if ($pos_of_star === false) {
4107
            return $condition_query_param_key;
4108
        } else {
4109
            $condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
4110
            return $condition_query_param_sans_star;
4111
        }
4112
    }
4113
4114