Skip to content

Commit

Permalink
Remove unnecessary type checking for the method from SentMessageEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
wkania committed Aug 31, 2024
1 parent 2aaf535 commit 2bbdc99
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mailer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1728,14 +1728,10 @@ which is useful for debugging errors::

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Mailer\Event\SentMessageEvent;
use Symfony\Component\Mailer\SentMessage;

public function onMessage(SentMessageEvent $event): void
{
$message = $event->getMessage();
if (!$message instanceof SentMessage) {
return;
}

// do something with the message
}
Expand Down

0 comments on commit 2bbdc99

Please sign in to comment.