Code Duplication    Length = 22-25 lines in 2 locations

src/Place/Place.php 1 location

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

src/Event/Event.php 1 location

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