Code Duplication    Length = 22-25 lines in 2 locations

src/Place/Place.php 1 location

@@ 98-119 (lines=22) @@
95
     *
96
     * @return self
97
     */
98
    public static function createPlace(
99
        $id,
100
        Title $title,
101
        EventType $eventType,
102
        Address $address,
103
        CalendarInterface $calendar,
104
        Theme $theme = null,
105
        DateTimeImmutable $publicationDate = null
106
    ) {
107
        $place = new self();
108
        $place->apply(new PlaceCreated(
109
            $id,
110
            $title,
111
            $eventType,
112
            $address,
113
            $calendar,
114
            $theme,
115
            $publicationDate
116
        ));
117
118
        return $place;
119
    }
120
121
    /**
122
     * Apply the place created event.

src/Event/Event.php 1 location

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