Skip to content

Commit

Permalink
Use a better name than "class Foo"
Browse files Browse the repository at this point in the history
It took me a while to figure out what represent `class Foo`
  • Loading branch information
BafS authored and javiereguiluz committed Mar 24, 2022
1 parent d96fcfe commit 1b8d52d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/event_dispatcher.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 1b8d52d

Please sign in to comment.