Code Duplication    Length = 15-16 lines in 2 locations

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

@@ 512-526 (lines=15) @@
509
     * @param string $organizerId
510
     * @return array
511
     */
512
    protected function organizerJSONLD($organizerId)
513
    {
514
        try {
515
            $organizerJSONLD = $this->organizerService->getEntity(
516
                $organizerId
517
            );
518
519
            return json_decode($organizerJSONLD);
520
        } catch (EntityNotFoundException $e) {
521
            // In case the place can not be found at the moment, just add its ID
522
            return array(
523
                '@id' => $this->organizerService->iri($organizerId)
524
            );
525
        }
526
    }
527
}
528

src/Event/EventLDProjector.php 1 location

@@ 545-560 (lines=16) @@
542
    /**
543
     * @inheritdoc
544
     */
545
    public function organizerJSONLD($organizerId)
546
    {
547
548
        try {
549
            $organizerJSONLD = $this->organizerService->getEntity(
550
                $organizerId
551
            );
552
553
            return json_decode($organizerJSONLD);
554
        } catch (EntityNotFoundException $e) {
555
            // In case the place can not be found at the moment, just add its ID
556
            return array(
557
                '@id' => $this->organizerService->iri($organizerId)
558
            );
559
        }
560
    }
561
562
    /**
563
     * @param EventWasLabelled $eventWasLabelled