Code Duplication    Length = 10-11 lines in 3 locations

src/Event/EventLDProjector.php 1 location

@@ 708-718 (lines=11) @@
705
     * Apply the booking info updated event to the event repository.
706
     * @param BookingInfoUpdated $bookingInfoUpdated
707
     */
708
    protected function applyBookingInfoUpdated(BookingInfoUpdated $bookingInfoUpdated)
709
    {
710
711
        $document = $this->loadDocumentFromRepository($bookingInfoUpdated);
712
713
        $eventLd = $document->getBody();
714
        $eventLd->bookingInfo = $bookingInfoUpdated->getBookingInfo()->toJsonLd();
715
716
        $this->repository->save($document->withBody($eventLd));
717
718
    }
719
720
    /**
721
     * Apply the imageAdded event to the event repository.

src/Place/ReadModel/JSONLD/PlaceLDProjector.php 2 locations

@@ 274-284 (lines=11) @@
271
     * Apply the booking info updated event to the place repository.
272
     * @param BookingInfoUpdated $bookingInfoUpdated
273
     */
274
    protected function applyBookingInfoUpdated(BookingInfoUpdated $bookingInfoUpdated)
275
    {
276
277
        $document = $this->loadPlaceDocumentFromRepository($bookingInfoUpdated);
278
279
        $placeLD = $document->getBody();
280
        $placeLD->bookingInfo = $bookingInfoUpdated->getBookingInfo()->toJsonLd();
281
282
        $this->repository->save($document->withBody($placeLD));
283
284
    }
285
286
    /**
287
     * Apply the typical age range updated event to the place repository.
@@ 353-362 (lines=10) @@
350
     * Apply the contact point updated event to the place repository.
351
     * @param ContactPointUpdated $contactPointUpdated
352
     */
353
    protected function applyContactPointUpdated(ContactPointUpdated $contactPointUpdated)
354
    {
355
356
        $document = $this->loadPlaceDocumentFromRepository($contactPointUpdated);
357
358
        $placeLd = $document->getBody();
359
        $placeLd->contactPoint = $contactPointUpdated->getContactPoint()->toJsonLd();
360
361
        $this->repository->save($document->withBody($placeLd));
362
    }
363
364
    /**
365
     * Apply the facilitiesupdated event to the place repository.