public function eventManager(EventManager $eventManager = null)
    {
        deprecationWarning(
            'EventDispatcherTrait::eventManager() is deprecated. ' .
            'Use EventDispatcherTrait::setEventManager()/getEventManager() instead.'
        );
        if ($eventManager !== null) {
            $this->setEventManager($eventManager);
        }

        return $this->getEventManager();
    }