Code Duplication    Length = 15-16 lines in 2 locations

src/Event/EventLDProjector.php 1 location

@@ 477-492 (lines=16) @@
474
    /**
475
     * @inheritdoc
476
     */
477
    public function organizerJSONLD($organizerId)
478
    {
479
480
        try {
481
            $organizerJSONLD = $this->organizerService->getEntity(
482
                $organizerId
483
            );
484
485
            return json_decode($organizerJSONLD);
486
        } catch (EntityNotFoundException $e) {
487
            // In case the place can not be found at the moment, just add its ID
488
            return array(
489
                '@id' => $this->organizerService->iri($organizerId)
490
            );
491
        }
492
    }
493
494
    /**
495
     * @param EventWasLabelled $eventWasLabelled

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