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

@@ 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