if (null !==
$event) { $title .=
sprintf(' for "%s" Event',
$event);
$registeredListeners =
$eventDispatcher->
getListeners($event);
} else { $title .= ' Grouped by Event';
// Try to see if "events" exists
$registeredListeners = \
array_key_exists('events',
$options) ?
array_combine($options['events'
],
array_map(fn ($event) =>
$eventDispatcher->
getListeners($event),
$options['events'
])) :
$eventDispatcher->
getListeners();
} $options['output'
]->
title($title);
if (null !==
$event) { $this->
renderEventListenerTable($eventDispatcher,
$event,
$registeredListeners,
$options['output'
]);
} else { ksort($registeredListeners);
foreach ($registeredListeners as $eventListened =>
$eventListeners) { $options['output'
]->
section(sprintf('"%s" event',
$eventListened));
$this->
renderEventListenerTable($eventDispatcher,
$eventListened,
$eventListeners,
$options['output'
]);
} } } protected function describeCallable(mixed
$callable, array
$options =
[]): void
{