Skip to content

Commit 3f14a12

Browse files
Backport type fixes
1 parent 22d7b2b commit 3f14a12

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

EventDispatcherInterface.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ interface EventDispatcherInterface extends ContractsEventDispatcherInterface
2525
/**
2626
* Adds an event listener that listens on the specified events.
2727
*
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)
3130
*/
32-
public function addListener(string $eventName, $listener, int $priority = 0);
31+
public function addListener(string $eventName, callable $listener, int $priority = 0);
3332

3433
/**
3534
* Adds an event subscriber.
@@ -41,10 +40,8 @@ public function addSubscriber(EventSubscriberInterface $subscriber);
4140

4241
/**
4342
* Removes an event listener from the specified events.
44-
*
45-
* @param callable $listener The listener to remove
4643
*/
47-
public function removeListener(string $eventName, $listener);
44+
public function removeListener(string $eventName, callable $listener);
4845

4946
public function removeSubscriber(EventSubscriberInterface $subscriber);
5047

@@ -60,11 +57,9 @@ public function getListeners(string $eventName = null);
6057
*
6158
* Returns null if the event or the listener does not exist.
6259
*
63-
* @param callable $listener The listener
64-
*
6560
* @return int|null The event listener priority
6661
*/
67-
public function getListenerPriority(string $eventName, $listener);
62+
public function getListenerPriority(string $eventName, callable $listener);
6863

6964
/**
7065
* Checks whether an event has any registered listeners.

0 commit comments

Comments
 (0)