| Total Complexity | 3 |
| Total Lines | 50 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class TwigSwiftMailer implements MailerInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @var Swift_Mailer |
||
| 20 | */ |
||
| 21 | private $mailer; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @var SwiftMessageFactoryInterface |
||
| 25 | */ |
||
| 26 | private $messageFactory; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | private $templateName; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | private $fromEmail; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var string|null |
||
| 40 | */ |
||
| 41 | private $replayToEmail; |
||
| 42 | |||
| 43 | public function __construct( |
||
| 44 | Swift_Mailer $mailer, |
||
| 45 | SwiftMessageFactoryInterface $messageFactory, |
||
| 46 | string $templateName, |
||
| 47 | string $fromEmail, |
||
| 48 | ?string $replayToEmail = null |
||
| 49 | ) { |
||
| 50 | $this->mailer = $mailer; |
||
| 51 | $this->messageFactory = $messageFactory; |
||
| 52 | $this->templateName = $templateName; |
||
| 53 | $this->fromEmail = $fromEmail; |
||
| 54 | $this->replayToEmail = $replayToEmail; |
||
| 55 | } |
||
| 56 | |||
| 57 | public function send(EmailableInterface $to): int |
||
| 66 | } |
||
| 67 | } |
||
| 68 |