Code Duplication    Length = 22-25 lines in 2 locations

src/Event/Event.php 1 location

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

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.