Code Duplication    Length = 9-10 lines in 3 locations

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

@@ 979-987 (lines=9) @@
976
     * @param string $id
977
     * @return JsonDocument
978
     */
979
    protected function newDocument($id)
980
    {
981
        $document = new JsonDocument($id);
982
983
        $offerLd = $document->getBody();
984
        $offerLd->{'@id'} = $this->iriGenerator->iri($id);
985
986
        return $document->withBody($offerLd);
987
    }
988
989
    /**
990
     * @param AbstractEvent $event

src/Organizer/OrganizerLDProjector.php 1 location

@@ 434-443 (lines=10) @@
431
     * @param string $id
432
     * @return JsonDocument
433
     */
434
    private function newDocument($id)
435
    {
436
        $document = new JsonDocument($id);
437
438
        $organizerLd = $document->getBody();
439
        $organizerLd->{'@id'} = $this->iriGenerator->iri($id);
440
        $organizerLd->{'@context'} = '/contexts/organizer';
441
442
        return $document->withBody($organizerLd);
443
    }
444
445
    /**
446
     * @param OrganizerEvent $organizerEvent

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

@@ 176-185 (lines=10) @@
173
     * @param string $id
174
     * @return JsonDocument
175
     */
176
    protected function newDocument($id)
177
    {
178
        $document = new JsonDocument($id);
179
180
        $placeLd = $document->getBody();
181
        $placeLd->{'@id'} = $this->iriGenerator->iri($id);
182
        $placeLd->{'@context'} = '/contexts/place';
183
184
        return $document->withBody($placeLd);
185
    }
186
187
    /**
188
     * @param PlaceCreated $placeCreated