$this->mailer =
$mailer;
$this->logger =
$logger;
} public function create(Dsn
$dsn): FakeChatEmailTransport|FakeChatLoggerTransport
{ $scheme =
$dsn->
getScheme();
if ('fakechat+email' ===
$scheme) { if (null ===
$this->mailer
) { $this->
throwMissingDependencyException($scheme, MailerInterface::
class, 'symfony/mailer'
);
} $mailerTransport =
$dsn->
getHost();
$to =
$dsn->
getRequiredOption('to'
);
$from =
$dsn->
getRequiredOption('from'
);
return (new FakeChatEmailTransport($this->mailer,
$to,
$from))->
setHost($mailerTransport);
} if ('fakechat+logger' ===
$scheme) { if (null ===
$this->logger
) {