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"
@@ 5833-5839 (lines=7) @@
5830
     */
5831
    public function get_all_copies($model_object_or_attributes_array, $query_params = array())
5832
    {
5833
        if ($model_object_or_attributes_array instanceof EE_Base_Class) {
5834
            $attributes_array = $model_object_or_attributes_array->model_field_array();
5835
        } elseif (is_array($model_object_or_attributes_array)) {
5836
            $attributes_array = $model_object_or_attributes_array;
5837
        } else {
5838
            throw new EE_Error(sprintf(__(
5839
                "get_all_copies should be provided with either a model object or an array of field-value-pairs, but was given %s",
5840
                "event_espresso"
5841
            ), $model_object_or_attributes_array));
5842
        }