Code Duplication    Length = 4-16 lines in 2 locations

core/db_classes/EE_CPT_Base.class.php 1 location

@@ 147-150 (lines=4) @@
144
     */
145
    public function remove_relation_to_term_taxonomy($term_taxonomy)
146
    {
147
        if (! $term_taxonomy) {
148
            EE_Error::add_error(
149
                sprintf(
150
                    __(
151
                        "No Term_Taxonomy provided which to remove from model object of type %s and id %d",
152
                        "event_espresso"
153
                    ),

core/db_classes/EE_Registration.class.php 1 location

@@ 1522-1537 (lines=16) @@
1519
            $datetime = $this->get_latest_related_datetime();
1520
            $DTT_ID = $datetime instanceof EE_Datetime ? $datetime->ID() : 0;
1521
            // verify the registration can checkin for the given DTT_ID
1522
        } elseif (! $this->can_checkin($DTT_ID, $verify)) {
1523
            EE_Error::add_error(
1524
                sprintf(
1525
                    esc_html__(
1526
                        'The given registration (ID:%1$d) can not be checked in to the given DTT_ID (%2$d), because the registration does not have access',
1527
                        'event_espresso'
1528
                    ),
1529
                    $this->ID(),
1530
                    $DTT_ID
1531
                ),
1532
                __FILE__,
1533
                __FUNCTION__,
1534
                __LINE__
1535
            );
1536
            return false;
1537
        }
1538
        $status_paths = array(
1539
            EE_Checkin::status_checked_never => EE_Checkin::status_checked_in,
1540
            EE_Checkin::status_checked_in    => EE_Checkin::status_checked_out,