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

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