Code Duplication    Length = 13-14 lines in 2 locations

src/Event/Event.php 1 location

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

src/Place/Place.php 1 location

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