Code Duplication    Length = 12-12 lines in 3 locations

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

@@ 731-742 (lines=12) @@
728
     * @param string $id
729
     * @return JsonDocument
730
     */
731
    protected function newDocument($id)
732
    {
733
        $document = new JsonDocument($id);
734
735
        $offerLd = $document->getBody();
736
        $offerLd->{'@id'} = $this->iriGenerator->iri($id);
737
        $offerLd->{'@context'} = '/contexts/event';
738
739
        return $document->withBody($offerLd);
740
    }
741
742
    /**
743
     * @param AbstractEvent $event
744
     * @return JsonDocument
745
     */

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

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