Code Duplication    Length = 7-7 lines in 2 locations

core/libraries/batch/JobHandlers/DatetimeOffsetFix.php 2 locations

@@ 427-433 (lines=7) @@
424
     * Used to set the saved offset range start date.
425
     * @param DbSafeDateTime|null $start_date
426
     */
427
    public static function updateStartDateRange(DbSafeDateTime $start_date = null)
428
    {
429
        $date_to_save = $start_date instanceof DbSafeDateTime
430
            ? $start_date->format('U')
431
            : '';
432
        update_option(self::OPTION_KEY_OFFSET_RANGE_START_DATE, $date_to_save);
433
    }
434
435
436
    /**
@@ 461-467 (lines=7) @@
458
     * Used to set the saved offset range end date.
459
     * @param DbSafeDateTime|null $end_date
460
     */
461
    public static function updateEndDateRange(DbSafeDateTime $end_date = null)
462
    {
463
        $date_to_save = $end_date instanceof DbSafeDateTime
464
            ? $end_date->format('U')
465
            : '';
466
        update_option(self::OPTION_KEY_OFFSET_RANGE_END_DATE, $date_to_save);
467
    }
468
469
470
    /**