diff --git a/components/event_dispatcher.rst b/components/event_dispatcher.rst index 0331c3320be..a0fc45ed78e 100644 --- a/components/event_dispatcher.rst +++ b/components/event_dispatcher.rst @@ -499,9 +499,9 @@ is dispatched, are passed as arguments to the listener:: use Symfony\Contracts\EventDispatcher\Event; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; - class Foo + class MySubscriber { - public function myEventListener(Event $event, $eventName, EventDispatcherInterface $dispatcher) + public function myEventListener(Event $event, string $eventName, EventDispatcherInterface $dispatcher) { // ... do something with the event name }