| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 22 | 2 | public function getEventName(EventInterface $event) |
|
| 23 | { |
||
| 24 | 2 | if (!($event instanceof NamedEventInterface)) { |
|
| 25 | 1 | throw new InvalidEventException(sprintf( |
|
| 26 | 1 | 'Event "%s" must be instance of "%s".', |
|
| 27 | get_class($event), |
||
| 28 | 1 | NamedEventInterface::class |
|
| 29 | )); |
||
| 30 | } |
||
| 31 | |||
| 32 | 1 | return $event->getName(); |
|
| 33 | } |
||
| 34 | } |
||
| 35 |