Skip to content
This repository was archived by the owner on Apr 17, 2022. It is now read-only.

Commit e21b8ed

Browse files
author
Calvin Alkan
authored
fixed type hints marking closures as wrong parameters for listen() (#4)
1 parent 8358b06 commit e21b8ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Dispatchers/WordpressDispatcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function hasListenerFor( $callable, $event ): bool {
103103

104104
/**
105105
* @param string $event
106-
* @param string|array $callable
106+
* @param string|array|Closure $callable
107107
*
108108
* @throws \Exception
109109
* @api

src/Mixin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static function dispatcher()
7373
* Register an event listener with the dispatcher.
7474
*
7575
* @param string $event
76-
* @param string|array $callable
76+
* @param string|array|\Closure $callable
7777
*
7878
* @return void
7979
* @throws \Exception

0 commit comments

Comments
 (0)