protected function getListenerFromAnnotation(Listener $listener): EventListener
    {
        $eventListener = new EventListener();

        $eventListener
            ->setEvent($listener->getEvent())
            ->setId($listener->getId())
            ->setName($listener->getName())
            ->setClass($listener->getClass())
            ->setProperty($listener->getProperty())
            ->setMethod($listener->getMethod())
            ->setStatic($listener->isStatic())
            ->setFunction($listener->getFunction())
            ->setMatches($listener->getMatches())
            ->setDependencies($listener->getDependencies())
            ->setArguments($listener->getArguments());

        return $eventListener;
    }