Code Duplication    Length = 9-9 lines in 2 locations

core/libraries/rest_api/ModelDataTranslator.php 1 location

@@ 760-768 (lines=9) @@
757
     * @param $condition_query_param_key
758
     * @return string
759
     */
760
    public static function removeStarsAndAnythingAfterFromConditionQueryParamKey($condition_query_param_key)
761
    {
762
        $pos_of_star = strpos($condition_query_param_key, '*');
763
        if ($pos_of_star === false) {
764
            return $condition_query_param_key;
765
        } else {
766
            $condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
767
            return $condition_query_param_sans_star;
768
        }
769
    }
770
771

core/db_models/EEM_Base.model.php 1 location

@@ 4193-4201 (lines=9) @@
4190
     * @param string $condition_query_param_key
4191
     * @return string
4192
     */
4193
    private function _remove_stars_and_anything_after_from_condition_query_param_key($condition_query_param_key)
4194
    {
4195
        $pos_of_star = strpos($condition_query_param_key, '*');
4196
        if ($pos_of_star === false) {
4197
            return $condition_query_param_key;
4198
        }
4199
        $condition_query_param_sans_star = substr($condition_query_param_key, 0, $pos_of_star);
4200
        return $condition_query_param_sans_star;
4201
    }
4202
4203
4204