Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

Commit ade59e0

Browse files
committed
Fix mailer memoization to work without tap
1 parent 03fd1da commit ade59e0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Testing/InteractsWithMail.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ private function setMailer(Mailer $mailer)
1818

1919
private function getMailer()
2020
{
21-
return tap($this->mailer ?: MailThief::getFacadeRoot(), function ($mailer) {
22-
$this->setMailer($mailer);
23-
});
21+
if (! $this->mailer) {
22+
$this->setMailer(MailThief::getFacadeRoot());
23+
}
24+
25+
return $this->mailer;
2426
}
2527

2628
/**

0 commit comments

Comments
 (0)