| 1 | <?php |
||
| 29 | class CoreEventHandler implements EventListenerInterface |
||
| 30 | { |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Returns a list of events this object is implementing. |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | public function implementedEvents() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param Event $event |
||
| 46 | */ |
||
| 47 | public function onControllerSetup(Event $event) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * Setup admin data. |
||
| 58 | * |
||
| 59 | * @param AppController $controller |
||
| 60 | * @SuppressWarnings("unused") |
||
| 61 | */ |
||
| 62 | protected function _onSetupAdmin(AppController $controller) |
||
| 75 | } |
||
| 76 |
There are different options of fixing this problem.
If you want to be on the safe side, you can add an additional type-check:
If you are sure that the expression is traversable, you might want to add a doc comment cast to improve IDE auto-completion and static analysis:
Mark the issue as a false-positive: Just hover the remove button, in the top-right corner of this issue for more options.