1 | <?php |
||
18 | class DispatchEventAction implements ActionInterface |
||
19 | { |
||
20 | /** @var EventDispatcherInterface */ |
||
21 | protected $eventDispatcher; |
||
22 | |||
23 | /** |
||
24 | * @param EventDispatcherInterface $eventDispatcher |
||
25 | */ |
||
26 | 3 | public function __construct(EventDispatcherInterface $eventDispatcher) |
|
30 | |||
31 | /** |
||
32 | * @param ContextInterface $context |
||
33 | * |
||
34 | * @return void |
||
35 | */ |
||
36 | 2 | public function execute(ContextInterface $context) |
|
41 | } |
||
42 |
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: