src/Viserio/Component/Events/DataCollector/TraceableEventManager.php
public function trigger($event, $target = null, array $argv = []): bool
    {
        if ((! \is_object($event) && ! ($event instanceof EventContract)) && \is_string($event)) {
            $event = new Event($event, $target, $argv);
        }

        if ($event->isPropagationStopped()) {
            $this->logger->debug(\sprintf('The [%s] event is already stopped. No listeners have been called.', $event->getName()));

            return false;
        }

        $this->preProcess($event->getName());

        $stopWatch = $this->stopwatch->start($event->getName(), 'section');

        $return = $this->eventManager->trigger($event, $target, $argv);

        if ($stopWatch->isStarted()) {
            $stopWatch->stop();
        }

        $this->postProcess($event->getName());

        return $return;
    }
public function trigger($event, $target = null, array $argv = []): bool
    {
        if ((! \is_object($event) && ! ($event instanceof EventContract)) && \is_string($event)) {
            $event = new Event($event, $target, $argv);
        }

        if ($event->isPropagationStopped()) {
            $this->logger->debug(\sprintf('The [%s] event is already stopped. No listeners have been called.', $event->getName()));

            return false;
        }

        $this->preProcess($event->getName());

        $stopWatch = $this->stopwatch->start($event->getName(), 'section');

        $return = $this->eventManager->trigger($event, $target, $argv);

        if ($stopWatch->isStarted()) {
            $stopWatch->stop();
        }

        $this->postProcess($event->getName());

        return $return;
    }
{@inheritdoc}