Code Duplication    Length = 22-25 lines in 2 locations

src/Place/Place.php 1 location

@@ 89-110 (lines=22) @@
86
     *
87
     * @return self
88
     */
89
    public static function createPlace(
90
        $id,
91
        Title $title,
92
        EventType $eventType,
93
        Address $address,
94
        CalendarInterface $calendar,
95
        Theme $theme = null,
96
        DateTimeImmutable $publicationDate = null
97
    ) {
98
        $place = new self();
99
        $place->apply(new PlaceCreated(
100
            $id,
101
            $title,
102
            $eventType,
103
            $address,
104
            $calendar,
105
            $theme,
106
            $publicationDate
107
        ));
108
109
        return $place;
110
    }
111
112
    /**
113
     * Apply the place created event.

src/Event/Event.php 1 location

@@ 92-116 (lines=25) @@
89
     * @param \DateTimeImmutable|null $publicationDate
90
     * @return Event
91
     */
92
    public static function create(
93
        $eventId,
94
        Title $title,
95
        EventType $eventType,
96
        Location $location,
97
        CalendarInterface $calendar,
98
        Theme $theme = null,
99
        \DateTimeImmutable $publicationDate = null
100
    ) {
101
        $event = new self();
102
103
        $event->apply(
104
            new EventCreated(
105
                $eventId,
106
                $title,
107
                $eventType,
108
                $location,
109
                $calendar,
110
                $theme,
111
                $publicationDate
112
            )
113
        );
114
115
        return $event;
116
    }
117
118
    /**
119
     * @param string $newEventId