Made events more verbose.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Abel Hoogeveen 2020-07-12 11:56:47 +02:00
parent 7a899e33d7
commit a8e6c46bb1
1 changed files with 5 additions and 5 deletions

View File

@ -224,16 +224,16 @@ class Events
//Check for listeners in this priority //Check for listeners in this priority
if (isset(self::$listeners[$eventName][$priority])) { if (isset(self::$listeners[$eventName][$priority])) {
$listeners = self::$listeners[$eventName][$priority]; $listeners = self::$listeners[$eventName][$priority];
Logger::newLevel('Found listeners with priority '.Priority::getPriority($priority)); Logger::newLevel('Listeners with priority '.Priority::getPriority($priority));
//Fire the event to each listener //Fire the event to each listener
foreach ($listeners as $callbackArray) { foreach ($listeners as $callbackArray) {
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
$callback = $callbackArray[0]; $callback = $callbackArray[0];
if (is_callable($callback)) { if (is_array($callback)) {
Logger::newLevel('Firing function');
} elseif (!is_string($callback[0])) {
Logger::newLevel('Firing '.get_class($callback[0]).'->'.$callback[1]); Logger::newLevel('Firing '.get_class($callback[0]).'->'.$callback[1]);
} else { } elseif (is_callable($callback)) {
Logger::newLevel('Firing function');
} else {
Logger::newLevel('Firing '.implode('->', $callback)); Logger::newLevel('Firing '.implode('->', $callback));
} }
// @codeCoverageIgnoreEnd // @codeCoverageIgnoreEnd