Analysing this code will make phpstan tell you that it has unused parameters.
/**
* SmtpAdapter constructor.
*
* @param \Swift_Mailer $mailer
* @param string $from
* @param string $to
* @param string $subject
* @param string $message
*/
public function __construct(\Swift_Mailer $mailer, $from, $to, $subject, $message)
{
$this->mailer = $mailer;
$this->options = compact('from', 'to', 'subject', 'message');
}