src/Viserio/Component/Events/DataCollector/TraceableEventManager.php
private function preProcess(string $eventName): void
    {
        if (\count($this->eventManager->getListeners($eventName)) === 0) {
            $this->orphanedEvents[] = $eventName;
        }

        foreach ($this->eventManager->getListeners($eventName) as $listener) {
            $priority        = $this->getListenerPriority($eventName, $listener);
            $wrappedListener = new WrappedListener($listener, null, $this->stopwatch, $this);

            $this->wrappedListeners[$eventName][] = $wrappedListener;

            $this->eventManager->detach($eventName, $listener);
            $this->eventManager->attach($eventName, $wrappedListener, $priority);
        }
    }
private function preProcess(string $eventName): void
    {
        if (\count($this->eventManager->getListeners($eventName)) === 0) {
            $this->orphanedEvents[] = $eventName;
        }

        foreach ($this->eventManager->getListeners($eventName) as $listener) {
            $priority        = $this->getListenerPriority($eventName, $listener);
            $wrappedListener = new WrappedListener($listener, null, $this->stopwatch, $this);

            $this->wrappedListeners[$eventName][] = $wrappedListener;

            $this->eventManager->detach($eventName, $listener);
            $this->eventManager->attach($eventName, $wrappedListener, $priority);
        }
    }
@param string $eventName

@return void