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

src/Organizer/OrganizerLDProjector.php 1 location

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