Use each instead of map

This commit is contained in:
James Brooks
2017-01-04 20:44:00 +00:00
parent c20a66ed48
commit 12b93e1d5b
4 changed files with 7 additions and 7 deletions
@@ -56,7 +56,7 @@ class SendComponentUpdateEmailNotificationHandler
// First notify all global subscribers.
$globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get();
$globalSubscribers->map(function ($subscriber) use ($component, $event) {
$globalSubscribers->each(function ($subscriber) use ($component, $event) {
$subscriber->notify(new ComponentStatusChangedNotification($component, $event->new_status));
});
@@ -71,7 +71,7 @@ class SendComponentUpdateEmailNotificationHandler
return in_array($subscriber->id, $notified);
});
$componentSubscribers->map(function ($subscriber) use ($component, $event) {
$componentSubscribers->each(function ($subscriber) use ($component, $event) {
$subscriber->notify(new ComponentStatusChangedNotification($component, $event->new_status));
});
}