Split onto multiple lines

This commit is contained in:
Oliver Davies 2019-05-22 21:25:05 +01:00
parent ac4af4dbd7
commit d100b42164

View file

@ -28,9 +28,12 @@ class SpeakersExtension extends AbstractExtension
*/ */
public function getSessionSpeakers($session, array $speakers): array public function getSessionSpeakers($session, array $speakers): array
{ {
return collect($speakers)->filter(function ($speaker) use ($session): bool { return collect($speakers)
return collect($session['speakers'])->contains($speaker['title']); ->filter(function ($speaker) use ($session): bool {
})->values()->toArray(); return collect($session['speakers'])->contains($speaker['title']);
})
->values()
->toArray();
} }
/** /**
@ -43,8 +46,11 @@ class SpeakersExtension extends AbstractExtension
*/ */
public function getSpeakerSessions($speaker, array $sessions): array public function getSpeakerSessions($speaker, array $sessions): array
{ {
return collect($sessions)->filter(function ($session) use ($speaker): bool { return collect($sessions)
return collect($session['speakers'])->contains($speaker['title']); ->filter(function ($session) use ($speaker): bool {
})->values()->toArray(); return collect($session['speakers'])->contains($speaker['title']);
})
->values()
->toArray();
} }
} }