Code Duplication    Length = 12-12 lines in 3 locations

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

@@ 152-163 (lines=12) @@
149
     * @param string $id
150
     * @return JsonDocument
151
     */
152
    protected function newDocument($id)
153
    {
154
        $document = new JsonDocument($id);
155
156
        $placeLd = $document->getBody();
157
        $placeLd->{'@id'} = $this->iriGenerator->iri($id);
158
        $placeLd->{'@context'} = '/contexts/place';
159
160
        return $document->withBody($placeLd);
161
    }
162
163
    /**
164
     * @param PlaceCreated $placeCreated
165
     * @param DomainMessage $domainMessage
166
     */

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
     */