| 1 | <?php |
||
| 12 | class StateMachineDispatcher |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var EventDispatcherInterface |
||
| 16 | */ |
||
| 17 | private $eventDispatcher; |
||
| 18 | |||
| 19 | public function __construct(EventDispatcherInterface $eventDispatcher = null) |
||
| 23 | |||
| 24 | public function dispatch($eventName, StateMachineEvent $event) |
||
| 32 | |||
| 33 | public function addListener($eventName, $listener, $priority = 0) |
||
| 37 | |||
| 38 | private static function isUnder43() |
||
| 49 | } |
||
| 50 |
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: