1 | <?php |
||
27 | class EventManager extends CakeEventManager |
||
28 | { |
||
29 | |||
30 | /** |
||
31 | * Load Event Handlers during bootstrap. |
||
32 | * |
||
33 | * Plugins can add their own custom EventHandler in Config/events.php |
||
34 | * with the following format: |
||
35 | * |
||
36 | * 'events' => [ |
||
37 | * 'Core.CoreEventHandler' => [ |
||
38 | * 'options' = [ |
||
39 | * 'callable' => '', |
||
40 | * 'priority' => '', |
||
41 | * ] |
||
42 | * ] |
||
43 | * ] |
||
44 | * |
||
45 | * @return void |
||
46 | */ |
||
47 | public static function loadListeners() |
||
70 | |||
71 | /** |
||
72 | * Emits an event. |
||
73 | * |
||
74 | * @param string $name |
||
75 | * @param object|null $subject |
||
76 | * @param array|null $data |
||
77 | * @return Event |
||
78 | */ |
||
79 | public static function trigger($name, $subject = null, $data = null) |
||
88 | } |
||
89 |
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.