| Conditions | 6 |
| Paths | 4 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public static function trigger($name, $argument = null) |
||
| 21 | { |
||
| 22 | foreach (self::$events[$name] as $event => $callback) { |
||
| 23 | if ($argument && is_array($argument)) { |
||
| 24 | call_user_func_array($callback, $argument); |
||
| 25 | } elseif ($argument && !is_array($argument)) { |
||
| 26 | call_user_func($callback, $argument); |
||
| 27 | } else { |
||
| 28 | call_user_func($callback); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 |