Code Duplication    Length = 10-10 lines in 2 locations

core/db_classes/EE_Registration.class.php 2 locations

@@ 1614-1623 (lines=10) @@
1611
     * @return EE_Datetime|null
1612
     * @throws EE_Error
1613
     */
1614
    public function get_latest_related_datetime()
1615
    {
1616
        return EEM_Datetime::instance()->get_one(
1617
            array(
1618
                array(
1619
                    'Ticket.Registration.REG_ID' => $this->ID(),
1620
                ),
1621
                'order_by' => array('DTT_EVT_start' => 'DESC'),
1622
            )
1623
        );
1624
    }
1625
1626
@@ 1633-1642 (lines=10) @@
1630
     *
1631
     * @throws EE_Error
1632
     */
1633
    public function get_earliest_related_datetime()
1634
    {
1635
        return EEM_Datetime::instance()->get_one(
1636
            array(
1637
                array(
1638
                    'Ticket.Registration.REG_ID' => $this->ID(),
1639
                ),
1640
                'order_by' => array('DTT_EVT_start' => 'ASC'),
1641
            )
1642
        );
1643
    }
1644
1645