Code Duplication    Length = 12-12 lines in 2 locations

core/libraries/form_sections/base/EE_Form_Section_Proper.form.php 1 location

@@ 549-560 (lines=12) @@
546
            $name,
547
            $require_construction_to_be_finalized
548
        );
549
        if (! $subsection instanceof EE_Form_Section_Proper) {
550
            throw new EE_Error(
551
                sprintf(
552
                    esc_html__(
553
                        "Subsection '%'s is not an instanceof EE_Form_Section_Proper on form '%s'",
554
                        'event_espresso'
555
                    ),
556
                    $name,
557
                    get_class($this)
558
                )
559
            );
560
        }
561
        return $subsection;
562
    }
563

core/db_classes/EE_Base_Class.class.php 1 location

@@ 2288-2299 (lines=12) @@
2285
            }
2286
        } else {
2287
            //this thing doesn't exist in the DB,  so just cache it
2288
            if (! $otherObjectModelObjectOrID instanceof EE_Base_Class) {
2289
                throw new EE_Error(
2290
                    sprintf(
2291
                        esc_html__(
2292
                            'Before a model object is saved to the database, calls to _add_relation_to must be passed an actual object, not just an ID. You provided %s as the model object to a %s',
2293
                            'event_espresso'
2294
                        ),
2295
                        $otherObjectModelObjectOrID,
2296
                        get_class($this)
2297
                    )
2298
                );
2299
            }
2300
            $otherObject = $otherObjectModelObjectOrID;
2301
            $this->cache($relationName, $otherObjectModelObjectOrID, $cache_id);
2302
        }