| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 63 | 2 | protected function eventHandlerName(Event $event) |
|
| 64 | { |
||
| 65 | 2 | $class = get_class($event); |
|
| 66 | |||
| 67 | 2 | if ('Event' === substr($class, -5)) { |
|
| 68 | 1 | $class = substr($class, 0, -5); |
|
| 69 | } |
||
| 70 | |||
| 71 | 2 | $class = str_replace('_', '\\', $class); // convert names for classes not in namespace |
|
| 72 | 2 | $parts = explode('\\', $class); |
|
| 73 | |||
| 74 | 2 | return 'on'.end($parts); |
|
| 75 | } |
||
| 76 | } |
||
| 77 |