| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | final class EventManager |
||
| 9 | { |
||
| 10 | private static $eventProvider = null; |
||
| 11 | |||
| 12 | private function __construct() |
||
| 14 | } |
||
| 15 | |||
| 16 | public static function eventProvider(): EventProvider |
||
| 17 | { |
||
| 18 | if (is_null(self::$eventProvider)) { |
||
| 19 | self::$eventProvider = new EventProvider(); |
||
| 20 | } |
||
| 21 | |||
| 22 | return self::$eventProvider; |
||
| 23 | } |
||
| 24 | |||
| 25 | public static function recordEvent(Event ...$events): void |
||
| 26 | { |
||
| 27 | self::eventProvider()->recordEvent(...$events); |
||
| 28 | } |
||
| 29 | |||
| 30 | public static function releaseEvents(): Generator |
||
| 33 | } |
||
| 34 | } |
||
| 35 |