Code Duplication    Length = 7-7 lines in 2 locations

src/Event/EventThemeResolver.php 1 location

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

src/Event/EventTypeResolver.php 1 location

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