private function processRevisions(array $calendarItems): void
    {
        /** @var DateTime[] $revisedDates */
        $revisedDates = [];

        /** @var CalendarItem[] $originalCalendarItems */
        $originalCalendarItems = [];

        foreach ($calendarItems as $calendarItem) {
            if ($calendarItem->getOriginalDate()) {
                $revisedDates[$calendarItem->getId()][] = $calendarItem->getOriginalDate();
            } else {
                $originalCalendarItems[$calendarItem->getId()] = $calendarItem;
            }
        }

        foreach ($originalCalendarItems as $calendarItem) {
            if (isset($revisedDates[$calendarItem->getId()])) {
                foreach ($revisedDates[$calendarItem->getId()] as $date) {
                    $calendarItem->addRepeatException($date);
                }
            }
        }
    }