| Conditions | 3 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 8 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | View Code Duplication | public static function off($name,callable $listener = null){ |
|
| 26 | if($listener === null) { |
||
| 27 | unset(static::$_listeners[$name]); |
||
| 28 | } else { |
||
| 29 | if ($idx = array_search($listener,static::$_listeners[$name],true)) |
||
| 30 | unset(static::$_listeners[$name][$idx]); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | |||
| 55 |
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.