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

[5.3] Update ChannelManager #17068

Merged
merged 2 commits into from
Jan 1, 2017
Merged

[5.3] Update ChannelManager #17068

merged 2 commits into from
Jan 1, 2017

Conversation

wuwx
Copy link
Contributor

@wuwx wuwx commented Jan 1, 2017

if the channels arg are null
the first $notifiable will call "via" method and set $channels value
the second $notifiable be skipped "via" method

@GrahamCampbell GrahamCampbell changed the title Update ChannelManager.php [5.3] Update ChannelManager Jan 1, 2017
@GrahamCampbell
Copy link
Member

A better fix would be to rename the variable in the loop, instead of the argument name. Also, we don't use snake_case.

@wuwx
Copy link
Contributor Author

wuwx commented Jan 1, 2017

i will change the code asap

@@ -59,7 +59,7 @@ public function sendNow($notifiables, $notification, array $channels = null)
foreach ($notifiables as $notifiable) {
$notificationId = Uuid::uuid4()->toString();

$channels = $channels ?: $notification->via($notifiable);
$channels = $use_channels ?: $notification->via($notifiable);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to rename the LHS variable name here, and keep the param the same.

@wuwx
Copy link
Contributor Author

wuwx commented Jan 1, 2017

how about name: viaChannels

Copy link
Member

@GrahamCampbell GrahamCampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now. 👍

@taylorotwell taylorotwell merged commit 5dd17b6 into laravel:5.3 Jan 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants