Code Duplication    Length = 22-25 lines in 2 locations

src/Place/Place.php 1 location

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

src/Event/Event.php 1 location

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