| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 33 | public function onSessionStart($session, $transport) |
||
| 34 | { |
||
| 35 | $sessionMonitor = new SessionMonitor(new Adapter($session)); |
||
| 36 | |||
| 37 | |||
| 38 | $sessionMonitor->on('list', function ($l) { |
||
| 39 | echo "\nLIST: \n"; |
||
| 40 | print_r($l); |
||
| 41 | }); |
||
| 42 | |||
| 43 | $sessionMonitor->on('join', function ($l) { |
||
| 44 | echo "\nJOIN: \n"; |
||
| 45 | print_r($l); |
||
| 46 | }); |
||
| 47 | |||
| 48 | $sessionMonitor->on('leave', function ($l) { |
||
| 49 | echo "\nLEAVE: \n"; |
||
| 50 | print_r($l); |
||
| 51 | }); |
||
| 52 | |||
| 53 | $sessionMonitor->on('error', function ($l) { |
||
| 54 | echo "\nERROR: \n"; |
||
| 55 | print_r($l); |
||
| 56 | }); |
||
| 57 | |||
| 58 | $sessionMonitor->start(); |
||
| 59 | |||
| 60 | echo "\n******** SESSION MONITOR STARTED ********\n"; |
||
| 61 | } |
||
| 62 | |||
| 70 |
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.