Code Duplication    Length = 10-13 lines in 4 locations

src/Organizer/Organizer.php 2 locations

@@ 204-215 (lines=12) @@
201
    /**
202
     * @param OrganizerImportedFromUDB2 $organizerImported
203
     */
204
    protected function applyOrganizerImportedFromUDB2(
205
        OrganizerImportedFromUDB2 $organizerImported
206
    ) {
207
        $this->actorId = (string) $organizerImported->getActorId();
208
209
        $actor = ActorItemFactory::createActorFromCdbXml(
210
            $organizerImported->getCdbXmlNamespaceUri(),
211
            $organizerImported->getCdbXml()
212
        );
213
214
        $this->labels = LabelCollection::fromKeywords($actor->getKeywords(true));
215
    }
216
217
    /**
218
     * @param OrganizerUpdatedFromUDB2 $organizerUpdatedFromUDB2
@@ 220-229 (lines=10) @@
217
    /**
218
     * @param OrganizerUpdatedFromUDB2 $organizerUpdatedFromUDB2
219
     */
220
    protected function applyOrganizerUpdatedFromUDB2(
221
        OrganizerUpdatedFromUDB2 $organizerUpdatedFromUDB2
222
    ) {
223
        $actor = ActorItemFactory::createActorFromCdbXml(
224
            $organizerUpdatedFromUDB2->getCdbXmlNamespaceUri(),
225
            $organizerUpdatedFromUDB2->getCdbXml()
226
        );
227
228
        $this->labels = LabelCollection::fromKeywords($actor->getKeywords(true));
229
    }
230
231
    /**
232
     * @param AddressUpdated $addressUpdated

src/Place/Place.php 2 locations

@@ 198-210 (lines=13) @@
195
    /**
196
     * @param PlaceImportedFromUDB2 $placeImported
197
     */
198
    public function applyPlaceImportedFromUDB2(
199
        PlaceImportedFromUDB2 $placeImported
200
    ) {
201
        $this->actorId = $placeImported->getActorId();
202
203
        $udb2Actor = ActorItemFactory::createActorFromCdbXml(
204
            $placeImported->getCdbXmlNamespaceUri(),
205
            $placeImported->getCdbXml()
206
        );
207
208
        $this->importWorkflowStatus($udb2Actor);
209
        $this->labels = LabelCollection::fromKeywords($udb2Actor->getKeywords(true));
210
    }
211
212
    /**
213
     * @param PlaceUpdatedFromUDB2 $placeUpdatedFromUDB2
@@ 215-225 (lines=11) @@
212
    /**
213
     * @param PlaceUpdatedFromUDB2 $placeUpdatedFromUDB2
214
     */
215
    public function applyPlaceUpdatedFromUDB2(
216
        PlaceUpdatedFromUDB2 $placeUpdatedFromUDB2
217
    ) {
218
        $udb2Actor = ActorItemFactory::createActorFromCdbXml(
219
            $placeUpdatedFromUDB2->getCdbXmlNamespaceUri(),
220
            $placeUpdatedFromUDB2->getCdbXml()
221
        );
222
223
        $this->importWorkflowStatus($udb2Actor);
224
        $this->labels = LabelCollection::fromKeywords($udb2Actor->getKeywords(true));
225
    }
226
227
    /**
228
     * @inheritdoc