Code Duplication    Length = 22-25 lines in 2 locations

src/Event/Event.php 1 location

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

src/Place/Place.php 1 location

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