1
0
Fork 0

Allow null eventName in EventDispatcher::dispatch

pull/10669/head
Jordi Boggiano 2022-03-29 21:58:53 +02:00 committed by GitHub
parent 039701656f
commit 906692cd04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -91,12 +91,12 @@ class EventDispatcher
/**
* Dispatch an event
*
* @param string $eventName An event name
* @param string|null $eventName An event name if no $event is provided
* @param Event $event
* @return int return code of the executed script if any, for php scripts a false return
* value is changed to 1, anything else to 0
*/
public function dispatch(string $eventName, Event $event = null): int
public function dispatch(?string $eventName, Event $event = null): int
{
if (null === $event) {
$event = new Event($eventName);