Add docblocks

This commit is contained in:
Oliver Davies 2019-05-20 23:55:16 +01:00
parent 200e357bf6
commit edee780079

View file

@ -7,6 +7,9 @@ use Twig\TwigFunction;
class SpeakersExtension extends AbstractExtension
{
/**
* {@inheritDoc}
*/
public function getFunctions()
{
return [
@ -15,6 +18,14 @@ class SpeakersExtension extends AbstractExtension
];
}
/**
* Get the speakers for a session.
*
* @param array|object $session
* @param array $speakers
*
* @return array
*/
public function getSessionSpeakers($session, array $speakers): array
{
return collect($speakers)->filter(function ($speaker) use ($session): bool {
@ -22,6 +33,14 @@ class SpeakersExtension extends AbstractExtension
})->values()->toArray();
}
/**
* Get the sessions for a speaker.
*
* @param array|object $speaker
* @param array $sessions
*
* @return array
*/
public function getSpeakerSessions($speaker, array $sessions): array
{
return collect($sessions)->filter(function ($session) use ($speaker): bool {