public function reject(Envelope
$envelope): void
{ throw new InvalidArgumentException('You cannot call reject() on the Messenger SyncTransport.'
);
} public function send(Envelope
$envelope): Envelope
{ /** @var SentStamp|null $sentStamp */
$sentStamp =
$envelope->
last(SentStamp::
class);
$alias = null ===
$sentStamp ? 'sync' :
($sentStamp->
getSenderAlias() ?:
$sentStamp->
getSenderClass());
$envelope =
$envelope->
with(new ReceivedStamp($alias));
return $this->messageBus->
dispatch($envelope);
}}