src/Event/Event.php
public static function create(
        $eventId,
        Language $mainLanguage,
        Title $title,
        EventType $eventType,
        Location $location,
        CalendarInterface $calendar,
        Theme $theme = null,
        \DateTimeImmutable $publicationDate = null
    ) {
        $event = new self();

        $event->apply(
            new EventCreated(
                $eventId,
                $mainLanguage,
                $title,
                $eventType,
                $location,
                $calendar,
                $theme,
                $publicationDate
            )
        );

        return $event;
    }
public static function create(
        $eventId,
        Language $mainLanguage,
        Title $title,
        EventType $eventType,
        Location $location,
        CalendarInterface $calendar,
        Theme $theme = null,
        \DateTimeImmutable $publicationDate = null
    ) {
        $event = new self();

        $event->apply(
            new EventCreated(
                $eventId,
                $mainLanguage,
                $title,
                $eventType,
                $location,
                $calendar,
                $theme,
                $publicationDate
            )
        );

        return $event;
    }
public static function create ( $ eventId , Language $ mainLanguage , Title $ title , EventType $ eventType , Location $ location , CalendarInterface $ calendar , Theme $ theme = null , \ DateTimeImmutable $ publicationDate = null ) { $ event = new self ( ) ; $ event -> apply ( new EventCreated ( $ eventId , $ mainLanguage , $ title , $ eventType , $ location , $ calendar , $ theme , $ publicationDate ) ) ; return $ event ; }
Factory method to create a new event.

@param $eventId
@param Language $mainLanguage
@param Title $title
@param EventType $eventType
@param Location $location
@param CalendarInterface $calendar
@param Theme|null $theme
@param \DateTimeImmutable|null $publicationDate
@return Event
Factory method to create a new event .