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

@@ 249-259 (lines=11) @@
246
     * Apply the booking info updated event to the place repository.
247
     * @param BookingInfoUpdated $bookingInfoUpdated
248
     */
249
    protected function applyBookingInfoUpdated(BookingInfoUpdated $bookingInfoUpdated)
250
    {
251
252
        $document = $this->loadPlaceDocumentFromRepository($bookingInfoUpdated);
253
254
        $placeLD = $document->getBody();
255
        $placeLD->bookingInfo = $bookingInfoUpdated->getBookingInfo()->toJsonLd();
256
257
        $this->repository->save($document->withBody($placeLD));
258
259
    }
260
261
    /**
262
     * Apply the typical age range updated event to the place repository.
@@ 328-337 (lines=10) @@
325
     * Apply the contact point updated event to the place repository.
326
     * @param ContactPointUpdated $contactPointUpdated
327
     */
328
    protected function applyContactPointUpdated(ContactPointUpdated $contactPointUpdated)
329
    {
330
331
        $document = $this->loadPlaceDocumentFromRepository($contactPointUpdated);
332
333
        $placeLd = $document->getBody();
334
        $placeLd->contactPoint = $contactPointUpdated->getContactPoint()->toJsonLd();
335
336
        $this->repository->save($document->withBody($placeLd));
337
    }
338
339
    /**
340
     * Apply the facilitiesupdated event to the place repository.