Code Duplication    Length = 10-10 lines in 2 locations

core/db_classes/EE_Registration.class.php 2 locations

@@ 1517-1526 (lines=10) @@
1514
     * @return EE_Datetime|null
1515
     * @throws \EE_Error
1516
     */
1517
    public function get_latest_related_datetime()
1518
    {
1519
        return EEM_Datetime::instance()->get_one(
1520
            array(
1521
                array(
1522
                    'Ticket.Registration.REG_ID' => $this->ID(),
1523
                ),
1524
                'order_by' => array('DTT_EVT_start' => 'DESC'),
1525
            )
1526
        );
1527
    }
1528
1529
@@ 1536-1545 (lines=10) @@
1533
     *
1534
     * @throws \EE_Error
1535
     */
1536
    public function get_earliest_related_datetime()
1537
    {
1538
        return EEM_Datetime::instance()->get_one(
1539
            array(
1540
                array(
1541
                    'Ticket.Registration.REG_ID' => $this->ID(),
1542
                ),
1543
                'order_by' => array('DTT_EVT_start' => 'ASC'),
1544
            )
1545
        );
1546
    }
1547
1548