File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
components/event_dispatcher Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ access the event arguments::
80
80
{
81
81
public function handler(GenericEvent $event)
82
82
{
83
- if (isset($event['type']) && $event['type'] === 'foo' ) {
83
+ if (isset($event['type']) && 'foo' === $event['type'] ) {
84
84
// ... do something
85
85
}
86
86
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ serve as a basic flag that this request underwent token authentication::
189
189
{
190
190
// ...
191
191
192
- if ($controller[0] instanceof TokenAuthenticatedController) {
192
+ if ($controller instanceof TokenAuthenticatedController) {
193
193
$token = $event->getRequest()->query->get('token');
194
194
if (!in_array($token, $this->tokens)) {
195
195
throw new AccessDeniedHttpException('This action needs a valid token!');
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ end of the method::
21
21
$event = new BeforeSendMailEvent($subject, $message);
22
22
$this->dispatcher->dispatch($event, 'mailer.pre_send');
23
23
24
- // get $foo and $bar from the event, they may have been modified
24
+ // get $subject and $message from the event, they may have been modified
25
25
$subject = $event->getSubject();
26
26
$message = $event->getMessage();
27
27
@@ -134,7 +134,7 @@ could listen to the ``mailer.post_send`` event and change the method's return va
134
134
public static function getSubscribedEvents()
135
135
{
136
136
return [
137
- 'mailer.post_send' => 'onMailerPostSend'
137
+ 'mailer.post_send' => 'onMailerPostSend',
138
138
];
139
139
}
140
140
}
You can’t perform that action at this time.
0 commit comments