1 | <?php |
||
23 | final class LeagueEventPublisher implements EventPublisher |
||
24 | { |
||
25 | /** |
||
26 | * @var EmitterInterface |
||
27 | */ |
||
28 | private $emitter; |
||
29 | |||
30 | /** |
||
31 | * Creates a League Event Publisher |
||
32 | * |
||
33 | * @param EmitterInterface $emitter |
||
34 | */ |
||
35 | public function __construct(EmitterInterface $emitter) |
||
39 | |||
40 | /** |
||
41 | * Publishes all event generated by provided generator |
||
42 | * |
||
43 | * @param EventGenerator $generator |
||
44 | */ |
||
45 | public function publishEventsFrom(EventGenerator $generator): void |
||
50 | |||
51 | /** |
||
52 | * Publishes a single event |
||
53 | * |
||
54 | * @param Event $event |
||
55 | */ |
||
56 | public function publish(Event $event): void |
||
60 | |||
61 | /** |
||
62 | * Adds an event listener |
||
63 | * |
||
64 | * @param string $event |
||
65 | * @param EventListener $listener |
||
66 | * @param int $priority |
||
67 | */ |
||
68 | public function addListener( |
||
75 | } |
||
76 |
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: