Type the event dispatcher listener callables with Psalm

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2020-10-28 08:54:24 +01:00 committed by backportbot[bot]
parent dac9c01eb5
commit 7ef3c95fa3
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,7 @@ interface IEventDispatcher {
* @param string $eventName preferably the fully-qualified class name of the Event sub class
* @psalm-param string|class-string<T> $eventName preferably the fully-qualified class name of the Event sub class
* @param callable $listener the object that is invoked when a matching event is dispatched
* @psalm-param callable(T):void $listener
* @param int $priority
*
* @since 17.0.0
@ -50,6 +51,7 @@ interface IEventDispatcher {
* @param string $eventName preferably the fully-qualified class name of the Event sub class
* @psalm-param string|class-string<T> $eventName preferably the fully-qualified class name of the Event sub class
* @param callable $listener the object that is invoked when a matching event is dispatched
* @psalm-param callable(T):void $listener
*
* @since 19.0.0
*/