Skip to content

Commit 43e3847

Browse files
GeertDDweaverryan
authored andcommitted
A few small improvements to the EventDispatcher Component docs
1 parent 0e80aba commit 43e3847

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/event_dispatcher/introduction.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ Connecting Listeners
134134

135135
To take advantage of an existing event, you need to connect a listener to the
136136
dispatcher so that it can be notified when the event is dispatched. A call to
137-
the dispatcher ``addListener()`` method associates any valid PHP callable to
137+
the dispatcher's ``addListener()`` method associates any valid PHP callable to
138138
an event::
139139

140140
$listener = new AcmeListener();
@@ -158,7 +158,7 @@ The ``addListener()`` method takes up to three arguments:
158158
A `PHP callable`_ is a PHP variable that can be used by the
159159
``call_user_func()`` function and returns ``true`` when passed to the
160160
``is_callable()`` function. It can be a ``\Closure`` instance, an object
161-
implementing an __invoke method (which is what closures are in fact),
161+
implementing an ``__invoke`` method (which is what closures are in fact),
162162
a string representing a function, or an array representing an object
163163
method or a class method.
164164

@@ -583,7 +583,7 @@ Dispatcher Shortcuts
583583

584584
The :method:`EventDispatcher::dispatch <Symfony\\Component\\EventDispatcher\\EventDispatcher::dispatch>`
585585
method always returns an :class:`Symfony\\Component\\EventDispatcher\\Event`
586-
object. This allows for various shortcuts. For example if one does not need
586+
object. This allows for various shortcuts. For example, if one does not need
587587
a custom event object, one can simply rely on a plain
588588
:class:`Symfony\\Component\\EventDispatcher\\Event` object. You do not even need
589589
to pass this to the dispatcher as it will create one by default unless you

0 commit comments

Comments
 (0)