Code Duplication    Length = 12-12 lines in 3 locations

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

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

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

@@ 724-735 (lines=12) @@
721
     * @param string $id
722
     * @return JsonDocument
723
     */
724
    protected function newDocument($id)
725
    {
726
        $document = new JsonDocument($id);
727
728
        $offerLd = $document->getBody();
729
        $offerLd->{'@id'} = $this->iriGenerator->iri($id);
730
        $offerLd->{'@context'} = '/contexts/event';
731
732
        return $document->withBody($offerLd);
733
    }
734
735
    /**
736
     * @param AbstractEvent $event
737
     * @return JsonDocument
738
     */

src/Organizer/OrganizerLDProjector.php 1 location

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