[FrameworkBundle] Code factorization in TraceableEventDispatcher

This commit is contained in:
Victor Berchet 2012-01-30 12:56:55 +01:00
parent 916597eb29
commit 307f17d33b
1 changed files with 2 additions and 12 deletions

View File

@ -121,18 +121,8 @@ class TraceableEventDispatcher extends ContainerAwareEventDispatcher implements
foreach ($skippedListeners as $skippedListener) {
if ($skipped) {
if (is_object($skippedListener)) {
$typeDefinition = get_class($skippedListener);
} 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));
$info = $this->getListenerInfo($skippedListener, $eventName);
$this->logger->debug(sprintf('Listener "%s" was not called for event "%s".', $info['pretty'], $eventName));
}
if ($skippedListener === $listener) {