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

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