| Conditions | 4 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | public function dispatch($hook, $parameters = array()) { |
||
| 56 | if (empty($this->hooks[$hook])) { |
||
| 57 | return false; |
||
| 58 | } |
||
| 59 | |||
| 60 | foreach ($this->hooks[$hook] as $priority => $hooked) { |
||
| 61 | foreach ($hooked as $callback) { |
||
| 62 | call_user_func_array($callback, $parameters); |
||
| 63 | } |
||
| 64 | } |
||
| 65 | |||
| 66 | return true; |
||
| 67 | } |
||
| 68 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.