| 1 | <?php |
||
| 10 | class EventSubscriber implements EventSubscriberInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Returns an array of event names this subscriber wants to listen to. |
||
| 14 | * |
||
| 15 | * @return array The event names to listen to |
||
| 16 | * |
||
| 17 | * @api |
||
| 18 | */ |
||
| 19 | public static function getSubscribedEvents() |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param ConsoleEvent $event |
||
| 26 | */ |
||
| 27 | public function registerComposer(ConsoleEvent $event) |
||
| 43 | } |
||
| 44 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: