| 1 | <?php |
||
| 10 | class EntityEventManager implements EventManagerInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var EventManager |
||
| 14 | */ |
||
| 15 | private $eventManager; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * EntityEventManager constructor. |
||
| 19 | * @param EventManager $eventManager |
||
| 20 | */ |
||
| 21 | public function __construct(EventManager $eventManager) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param EventInterface $event |
||
| 28 | */ |
||
| 29 | public function trigger(EventInterface $event) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param $event |
||
| 36 | * @param $listener |
||
| 37 | */ |
||
| 38 | public function attach($event, $listener = null) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param $event |
||
| 45 | * @param EntityInterface|null $entity |
||
| 46 | * @param array $data |
||
| 47 | * @return EntityEvent |
||
| 48 | */ |
||
| 49 | public function createEvent($event, EntityInterface $entity = null, array $data = []) |
||
| 53 | } |
||
| 54 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: