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

Commit

Permalink
Fix mailer memoization to work without tap
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstauffer committed Oct 15, 2017
1 parent 03fd1da commit ade59e0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Testing/InteractsWithMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ private function setMailer(Mailer $mailer)

private function getMailer()
{
return tap($this->mailer ?: MailThief::getFacadeRoot(), function ($mailer) {
$this->setMailer($mailer);
});
if (! $this->mailer) {
$this->setMailer(MailThief::getFacadeRoot());
}

return $this->mailer;
}

/**
Expand Down

0 comments on commit ade59e0

Please sign in to comment.