Code Duplication    Length = 12-12 lines in 2 locations

src/Organizer/OrganizerLDProjector.php 2 locations

@@ 233-244 (lines=12) @@
230
    /**
231
     * @param AddressUpdated $addressUpdated
232
     */
233
    private function applyAddressUpdated(AddressUpdated $addressUpdated)
234
    {
235
        $organizerId = $addressUpdated->getOrganizerId();
236
        $address = $addressUpdated->getAddress();
237
238
        $document = $this->repository->get($organizerId);
239
240
        $jsonLD = $document->getBody();
241
        $jsonLD->address = $address->toJsonLd();
242
243
        $this->repository->save($document->withBody($jsonLD));
244
    }
245
246
    /**
247
     * @param ContactPointUpdated $contactPointUpdated
@@ 249-260 (lines=12) @@
246
    /**
247
     * @param ContactPointUpdated $contactPointUpdated
248
     */
249
    private function applyContactPointUpdated(ContactPointUpdated $contactPointUpdated)
250
    {
251
        $organizerId = $contactPointUpdated->getOrganizerId();
252
        $contactPoint = $contactPointUpdated->getContactPoint();
253
254
        $document = $this->repository->get($organizerId);
255
256
        $jsonLD = $document->getBody();
257
        $jsonLD->contactPoint = $contactPoint->toJsonLd();
258
259
        $this->repository->save($document->withBody($jsonLD));
260
    }
261
262
    /**
263
     * @param OrganizerUpdatedFromUDB2 $organizerUpdatedFromUDB2