File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,16 @@ class AsyncEventDispatcher implements EventDispatcherInterface
3232
3333 /**
3434 * @param ListenerProviderInterface $listenerProvider The provider of event listeners
35- * @param Closure (Throwable): (void) $errorHandler The handler for errors thrown by listeners
35+ * @param callable (Throwable): (void) $errorHandler The handler for errors thrown by listeners
3636 */
3737 public function __construct (
3838 private readonly ListenerProviderInterface $ listenerProvider ,
39- ?Closure $ errorHandler = null
39+ ?callable $ errorHandler = null
4040 ) {
4141 if ($ errorHandler === null ) {
4242 $ this ->errorHandler = function (Throwable $ exception ): void {};
4343 } else {
44- $ this ->errorHandler = $ errorHandler ;
44+ $ this ->errorHandler = Closure:: fromCallable ( $ errorHandler) ;
4545 }
4646 }
4747
You can’t perform that action at this time.
0 commit comments