From e678c4752a35b06c0a77d17fc23aa2de6abc4e18 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 17 Jan 2016 12:52:30 +0100 Subject: Use translator interface instead of final class Symfony use a different class when in dev mode and prod mode. Prod loads `Symfony\Bundle\FrameworkBundle\Translation\Translator`. Dev loads `Symfony\Component\Translation\DataCollectorTranslator` to gather information for the debug bar. Fix #1585 --- src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php') diff --git a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php index f1960070..be370e71 100644 --- a/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php +++ b/src/Wallabag/UserBundle/Mailer/AuthCodeMailer.php @@ -4,7 +4,7 @@ namespace Wallabag\UserBundle\Mailer; use Scheb\TwoFactorBundle\Model\Email\TwoFactorInterface; use Scheb\TwoFactorBundle\Mailer\AuthCodeMailerInterface; -use Symfony\Component\Translation\DataCollectorTranslator; +use Symfony\Component\Translation\TranslatorInterface; /** * Custom mailer for TwoFactorBundle email. @@ -22,7 +22,7 @@ class AuthCodeMailer implements AuthCodeMailerInterface /** * Translator for email content. * - * @var DataCollectorTranslator + * @var TranslatorInterface */ private $translator; @@ -50,13 +50,13 @@ class AuthCodeMailer implements AuthCodeMailerInterface /** * Initialize the auth code mailer with the SwiftMailer object. * - * @param \Swift_Mailer $mailer - * @param DataCollectorTranslator $translator - * @param string $senderEmail - * @param string $senderName - * @param string $supportUrl + * @param \Swift_Mailer $mailer + * @param TranslatorInterface $translator + * @param string $senderEmail + * @param string $senderName + * @param string $supportUrl */ - public function __construct(\Swift_Mailer $mailer, DataCollectorTranslator $translator, $senderEmail, $senderName, $supportUrl) + public function __construct(\Swift_Mailer $mailer, TranslatorInterface $translator, $senderEmail, $senderName, $supportUrl) { $this->mailer = $mailer; $this->translator = $translator; -- cgit v1.2.3