Code Duplication    Length = 13-14 lines in 2 locations

src/Event/Event.php 1 location

@@ 198-211 (lines=14) @@
195
        return $this->eventId;
196
    }
197
198
    protected function applyEventCreated(EventCreated $eventCreated)
199
    {
200
        $this->eventId = $eventCreated->getEventId();
201
        $this->titles[$eventCreated->getMainLanguage()->getCode()] = $eventCreated->getTitle();
202
        $this->calendar = $eventCreated->getCalendar();
203
        $this->audience = new Audience(AudienceType::EVERYONE());
204
        $this->contactPoint = new ContactPoint();
205
        $this->bookingInfo = new BookingInfo();
206
        $this->typeId = $eventCreated->getEventType()->getId();
207
        $this->themeId = $eventCreated->getTheme() ? $eventCreated->getTheme()->getId() : null;
208
        $this->locationId = $eventCreated->getLocation();
209
        $this->mainLanguage = $eventCreated->getMainLanguage();
210
        $this->workflowStatus = WorkflowStatus::DRAFT();
211
    }
212
213
    /**
214
     * @param EventCopied $eventCopied

src/Place/Place.php 1 location

@@ 123-135 (lines=13) @@
120
        return $place;
121
    }
122
123
    protected function applyPlaceCreated(PlaceCreated $placeCreated): void
124
    {
125
        $this->mainLanguage = $placeCreated->getMainLanguage();
126
        $this->titles[$this->mainLanguage->getCode()] = $placeCreated->getTitle();
127
        $this->calendar = $placeCreated->getCalendar();
128
        $this->contactPoint = new ContactPoint();
129
        $this->bookingInfo = new BookingInfo();
130
        $this->typeId = $placeCreated->getEventType()->getId();
131
        $this->themeId = $placeCreated->getTheme() ? $placeCreated->getTheme()->getId() : null;
132
        $this->addresses[$this->mainLanguage->getCode()] = $placeCreated->getAddress();
133
        $this->placeId = $placeCreated->getPlaceId();
134
        $this->workflowStatus = WorkflowStatus::DRAFT();
135
    }
136
137
    public function updateMajorInfo(
138
        Title $title,