Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | public function run($name, $data) |
||
28 | { |
||
29 | if (! array_key_exists($name, $this->events)) |
||
30 | throw new \BadMethodCallException; |
||
31 | |||
32 | if (is_callable($this->events[$name])) |
||
33 | call_user_func($this->events[$name], $data); |
||
34 | else |
||
35 | call_user_func([$this, $this->events[$name]], $data); |
||
36 | } |
||
63 |