| Conditions | 4 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 39 | public static function dispatch($eventname, $params) : mixed |
||
| 40 | { |
||
| 41 | $data = null; |
||
| 42 | if (!self::isEvent($eventname)) { |
||
| 43 | self::register($eventname); |
||
| 44 | } |
||
| 45 | foreach (self::$events[$eventname] as $key => $weight) { |
||
| 46 | foreach ($weight as $callback) { |
||
| 47 | $data = call_user_func_array($callback, $params); |
||
| 48 | } |
||
| 49 | } |
||
| 50 | |||
| 51 | return $data; |
||
| 52 | } |
||
| 67 |