Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Fix returns with Mail & Notification components #36559

Merged
merged 1 commit into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Illuminate/Mail/Mailable.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class Mailable implements MailableContract, Renderable
*/
public function send($mailer)
{
return $this->withLocale($this->locale, function () use ($mailer) {
$this->withLocale($this->locale, function () use ($mailer) {
Container::getInstance()->call([$this, 'build']);

$mailer = $mailer instanceof MailFactory
Expand Down
6 changes: 3 additions & 3 deletions src/Illuminate/Mail/Mailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function bcc($users)
*/
public function html($html, $callback)
{
return $this->send(['html' => new HtmlString($html)], [], $callback);
$this->send(['html' => new HtmlString($html)], [], $callback);
}

/**
Expand All @@ -209,7 +209,7 @@ public function html($html, $callback)
*/
public function raw($text, $callback)
{
return $this->send(['raw' => $text], [], $callback);
$this->send(['raw' => $text], [], $callback);
}

/**
Expand All @@ -222,7 +222,7 @@ public function raw($text, $callback)
*/
public function plain($view, array $data, $callback)
{
return $this->send(['text' => $view], $data, $callback);
$this->send(['text' => $view], $data, $callback);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Mail/PendingMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ public function bcc($users)
* Send a new mailable message instance.
*
* @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return mixed
* @return void
*/
public function send(MailableContract $mailable)
{
return $this->mailer->send($this->fill($mailable));
$this->mailer->send($this->fill($mailable));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Notifications/ChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ChannelManager extends Manager implements DispatcherContract, FactoryContr
*/
public function send($notifiables, $notification)
{
return (new NotificationSender(
(new NotificationSender(
$this, $this->container->make(Bus::class), $this->container->make(Dispatcher::class), $this->locale)
)->send($notifiables, $notification);
}
Expand All @@ -49,7 +49,7 @@ public function send($notifiables, $notification)
*/
public function sendNow($notifiables, $notification, array $channels = null)
{
return (new NotificationSender(
(new NotificationSender(
$this, $this->container->make(Bus::class), $this->container->make(Dispatcher::class), $this->locale)
)->sendNow($notifiables, $notification, $channels);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Notifications/NotificationSender.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function send($notifiables, $notification)
return $this->queueNotification($notifiables, $notification);
}

return $this->sendNow($notifiables, $notification);
$this->sendNow($notifiables, $notification);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/EventFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ public function forgetPushed()
*
* @param string|object $event
* @param mixed $payload
* @return void
* @return array|null
*/
public function until($event, $payload = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/NotificationFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ protected function notificationsFor($notifiable, $notification)
*/
public function send($notifiables, $notification)
{
return $this->sendNow($notifiables, $notification);
$this->sendNow($notifiables, $notification);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/Illuminate/Support/Testing/Fakes/PendingMailFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public function __construct($mailer)
* Send a new mailable message instance.
*
* @param \Illuminate\Contracts\Mail\Mailable $mailable
* @return mixed
* @return void
*/
public function send(Mailable $mailable)
{
return $this->mailer->send($this->fill($mailable));
$this->mailer->send($this->fill($mailable));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Support/Testing/Fakes/QueueFake.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function assertPushedOn($queue, $job, $callback = null)
[$job, $callback] = [$this->firstClosureParameterType($job), $job];
}

return $this->assertPushed($job, function ($job, $pushedQueue) use ($callback, $queue) {
$this->assertPushed($job, function ($job, $pushedQueue) use ($callback, $queue) {
if ($pushedQueue !== $queue) {
return false;
}
Expand Down