[Notifier] Return SentMessage from the Notifier message handler

This commit is contained in:
Fabien Potencier 2020-06-24 08:23:54 +02:00
parent ce8f8a5f18
commit 5855d112b7

View File

@ -12,6 +12,7 @@
namespace Symfony\Component\Notifier\Messenger;
use Symfony\Component\Notifier\Message\MessageInterface;
use Symfony\Component\Notifier\Message\SentMessage;
use Symfony\Component\Notifier\Transport\TransportInterface;
/**
@ -28,8 +29,8 @@ final class MessageHandler
$this->transport = $transport;
}
public function __invoke(MessageInterface $message)
public function __invoke(MessageInterface $message): ?SentMessage
{
$this->transport->send($message);
return $this->transport->send($message);
}
}