Skip to content

Commit bdebdac

Browse files
authored
Use a better name than "class Foo"
It took me a while to figure out what represent `class Foo`
1 parent 75862b6 commit bdebdac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/event_dispatcher.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ is dispatched, are passed as arguments to the listener::
491491
use Symfony\Contracts\EventDispatcher\Event;
492492
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
493493

494-
class Foo
494+
class MySubscriber
495495
{
496-
public function myEventListener(Event $event, $eventName, EventDispatcherInterface $dispatcher)
496+
public function myEventListener(Event $event, string $eventName, EventDispatcherInterface $dispatcher)
497497
{
498498
// ... do something with the event name
499499
}

0 commit comments

Comments
 (0)