[FrameworkBundle] Code factorization in TraceableEventDispatcher
This commit is contained in:
parent
916597eb29
commit
307f17d33b
@ -121,18 +121,8 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
|
|||||||
|
|
||||||
foreach ($skippedListeners as $skippedListener) {
|
foreach ($skippedListeners as $skippedListener) {
|
||||||
if ($skipped) {
|
if ($skipped) {
|
||||||
if (is_object($skippedListener)) {
|
$info = $this->getListenerInfo($skippedListener, $eventName);
|
||||||
$typeDefinition = get_class($skippedListener);
|
$this->logger->debug(sprintf('Listener "%s" was not called for event "%s".', $info['pretty'], $eventName));
|
||||||
} elseif (is_array($skippedListener)) {
|
|
||||||
if (is_object($skippedListener[0])) {
|
|
||||||
$typeDefinition = get_class($skippedListener[0]);
|
|
||||||
} else {
|
|
||||||
$typeDefinition = implode('::', $skippedListener);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$typeDefinition = $skippedListener;
|
|
||||||
}
|
|
||||||
$this->logger->debug(sprintf('Listener "%s" was not called for event "%s".', $typeDefinition, $eventName));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($skippedListener === $listener) {
|
if ($skippedListener === $listener) {
|
||||||
|
Reference in New Issue
Block a user