Code Duplication    Length = 12-12 lines in 3 locations

src/Offer/ReadModel/JSONLD/OfferLDProjector.php 1 location

@@ 765-776 (lines=12) @@
762
     * @param string $id
763
     * @return JsonDocument
764
     */
765
    protected function newDocument($id)
766
    {
767
        $document = new JsonDocument($id);
768
769
        $offerLd = $document->getBody();
770
        $offerLd->{'@id'} = $this->iriGenerator->iri($id);
771
        $offerLd->{'@context'} = '/contexts/event';
772
773
        return $document->withBody($offerLd);
774
    }
775
776
    /**
777
     * @param AbstractEvent $event
778
     * @return JsonDocument
779
     */

src/Place/ReadModel/JSONLD/PlaceLDProjector.php 1 location

@@ 164-175 (lines=12) @@
161
     * @param string $id
162
     * @return JsonDocument
163
     */
164
    protected function newDocument($id)
165
    {
166
        $document = new JsonDocument($id);
167
168
        $placeLd = $document->getBody();
169
        $placeLd->{'@id'} = $this->iriGenerator->iri($id);
170
        $placeLd->{'@context'} = '/contexts/place';
171
172
        return $document->withBody($placeLd);
173
    }
174
175
    /**
176
     * @param PlaceCreated $placeCreated
177
     * @param DomainMessage $domainMessage
178
     */

src/Organizer/OrganizerLDProjector.php 1 location

@@ 371-382 (lines=12) @@
368
     * @param string $id
369
     * @return JsonDocument
370
     */
371
    private function newDocument($id)
372
    {
373
        $document = new JsonDocument($id);
374
375
        $organizerLd = $document->getBody();
376
        $organizerLd->{'@id'} = $this->iriGenerator->iri($id);
377
        $organizerLd->{'@context'} = '/contexts/organizer';
378
379
        return $document->withBody($organizerLd);
380
    }
381
382
    /**
383
     * @param OrganizerEvent $organizerEvent
384
     * @param Title $title
385
     * @param Language|null $language