Code Duplication    Length = 7-7 lines in 4 locations

src/Event/EventThemeResolver.php 1 location

@@ 609-615 (lines=7) @@
606
    /**
607
     * @inheritdoc
608
     */
609
    public function byId(StringLiteral $themeId)
610
    {
611
        if (!array_key_exists((string) $themeId, $this->themes)) {
612
            throw new \Exception("Unknown event theme id: " . $themeId);
613
        }
614
        return $this->themes[(string) $themeId];
615
    }
616
}
617

src/Event/EventTypeResolver.php 1 location

@@ 44-50 (lines=7) @@
41
    /**
42
     * @inheritdoc
43
     */
44
    public function byId(StringLiteral $typeId)
45
    {
46
        if (!array_key_exists((string) $typeId, $this->types)) {
47
            throw new \Exception("Unknown event type id: " . $typeId);
48
        }
49
        return $this->types[(string) $typeId];
50
    }
51
}
52

src/Place/PlaceThemeResolver.php 1 location

@@ 24-30 (lines=7) @@
21
    /**
22
     * @inheritdoc
23
     */
24
    public function byId(StringLiteral $themeId)
25
    {
26
        if (!array_key_exists((string) $themeId, $this->themes)) {
27
            throw new \Exception("Unknown place theme id: " . $themeId);
28
        }
29
        return $this->themes[(string) $themeId];
30
    }
31
}
32

src/Place/PlaceTypeResolver.php 1 location

@@ 42-48 (lines=7) @@
39
    /**
40
     * @inheritdoc
41
     */
42
    public function byId(StringLiteral $typeId)
43
    {
44
        if (!array_key_exists((string) $typeId, $this->types)) {
45
            throw new \Exception("Unknown place type id: " . $typeId);
46
        }
47
        return $this->types[(string) $typeId];
48
    }
49
}
50