Code Duplication    Length = 12-12 lines in 3 locations

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

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

src/Organizer/OrganizerLDProjector.php 1 location

@@ 285-296 (lines=12) @@
282
     * @param string $id
283
     * @return JsonDocument
284
     */
285
    protected function newDocument($id)
286
    {
287
        $document = new JsonDocument($id);
288
289
        $organizerLd = $document->getBody();
290
        $organizerLd->{'@id'} = $this->iriGenerator->iri($id);
291
        $organizerLd->{'@context'} = '/contexts/organizer';
292
293
        return $document->withBody($organizerLd);
294
    }
295
}
296

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

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