diff --git a/src/SonsOfPHP/Component/EventDispatcher/EventDispatcher.php b/src/SonsOfPHP/Component/EventDispatcher/EventDispatcher.php index 97bc2cca..f7fd99ba 100644 --- a/src/SonsOfPHP/Component/EventDispatcher/EventDispatcher.php +++ b/src/SonsOfPHP/Component/EventDispatcher/EventDispatcher.php @@ -23,7 +23,7 @@ public function __construct( * @param string|null $eventName * Is the event name is null, is will use the event's classname as the Event Name */ - public function dispatch(object $event, string $eventName = null): object + public function dispatch(object $event, ?string $eventName = null): object { $eventName ??= $event::class;