Code Duplication    Length = 7-7 lines in 2 locations

core/db_models/EEM_Base.model.php 2 locations

@@ 2865-2871 (lines=7) @@
2862
     */
2863
    public function get_one_conflicting($obj_or_fields_array, $include_primary_key = true)
2864
    {
2865
        if ($obj_or_fields_array instanceof EE_Base_Class) {
2866
            $fields_n_values = $obj_or_fields_array->model_field_array();
2867
        } elseif (is_array($obj_or_fields_array)) {
2868
            $fields_n_values = $obj_or_fields_array;
2869
        } else {
2870
            throw new EE_Error(
2871
                sprintf(
2872
                    __(
2873
                        "%s get_all_conflicting should be called with a model object or an array of field names and values, you provided %d",
2874
                        "event_espresso"
@@ 5837-5843 (lines=7) @@
5834
     */
5835
    public function get_all_copies($model_object_or_attributes_array, $query_params = array())
5836
    {
5837
        if ($model_object_or_attributes_array instanceof EE_Base_Class) {
5838
            $attributes_array = $model_object_or_attributes_array->model_field_array();
5839
        } elseif (is_array($model_object_or_attributes_array)) {
5840
            $attributes_array = $model_object_or_attributes_array;
5841
        } else {
5842
            throw new EE_Error(sprintf(__(
5843
                "get_all_copies should be provided with either a model object or an array of field-value-pairs, but was given %s",
5844
                "event_espresso"
5845
            ), $model_object_or_attributes_array));
5846
        }