From e21b8ed0665b1fb5a842b10efe84a349d7f74912 Mon Sep 17 00:00:00 2001 From: Calvin Alkan Date: Wed, 21 Apr 2021 20:44:04 -0500 Subject: [PATCH] fixed type hints marking closures as wrong parameters for listen() (#4) --- src/Dispatchers/WordpressDispatcher.php | 2 +- src/Mixin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Dispatchers/WordpressDispatcher.php b/src/Dispatchers/WordpressDispatcher.php index fc86d23..ce6a143 100644 --- a/src/Dispatchers/WordpressDispatcher.php +++ b/src/Dispatchers/WordpressDispatcher.php @@ -103,7 +103,7 @@ public function hasListenerFor( $callable, $event ): bool { /** * @param string $event - * @param string|array $callable + * @param string|array|Closure $callable * * @throws \Exception * @api diff --git a/src/Mixin.php b/src/Mixin.php index 89aeb6f..ae67185 100644 --- a/src/Mixin.php +++ b/src/Mixin.php @@ -73,7 +73,7 @@ public static function dispatcher() * Register an event listener with the dispatcher. * * @param string $event - * @param string|array $callable + * @param string|array|\Closure $callable * * @return void * @throws \Exception