@@ -25,11 +25,10 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface
25
25
/**
26
26
* Adds an event listener that listens on the specified events.
27
27
*
28
- * @param callable $listener The listener
29
- * @param int $priority The higher this value, the earlier an event
30
- * listener will be triggered in the chain (defaults to 0)
28
+ * @param int $priority The higher this value, the earlier an event
29
+ * listener will be triggered in the chain (defaults to 0)
31
30
*/
32
- public function addListener (string $ eventName , $ listener , int $ priority = 0 );
31
+ public function addListener (string $ eventName , callable $ listener , int $ priority = 0 );
33
32
34
33
/**
35
34
* Adds an event subscriber.
@@ -41,10 +40,8 @@ public function addSubscriber(EventSubscriberInterface $subscriber);
41
40
42
41
/**
43
42
* Removes an event listener from the specified events.
44
- *
45
- * @param callable $listener The listener to remove
46
43
*/
47
- public function removeListener (string $ eventName , $ listener );
44
+ public function removeListener (string $ eventName , callable $ listener );
48
45
49
46
public function removeSubscriber (EventSubscriberInterface $ subscriber );
50
47
@@ -60,11 +57,9 @@ public function getListeners(string $eventName = null);
60
57
*
61
58
* Returns null if the event or the listener does not exist.
62
59
*
63
- * @param callable $listener The listener
64
- *
65
60
* @return int|null The event listener priority
66
61
*/
67
- public function getListenerPriority (string $ eventName , $ listener );
62
+ public function getListenerPriority (string $ eventName , callable $ listener );
68
63
69
64
/**
70
65
* Checks whether an event has any registered listeners.
0 commit comments