Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | public function add(EventListenerInterface $eventListener) |
||
50 | { |
||
51 | if ($eventListener->getSupportedEventClassName() !== $this->eventName) { |
||
52 | throw new RuntimeException( |
||
53 | sprintf( |
||
54 | 'EventListener %s does not support event %s.', |
||
55 | get_class($eventListener), |
||
56 | $this->eventName |
||
57 | ) |
||
58 | ); |
||
59 | } |
||
60 | |||
61 | $this->eventListeners[] = $eventListener; |
||
62 | } |
||
63 | |||
72 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.