private function isEventSubscriber($subscriberClass): bool
    {
        return \is_object($subscriberClass) || (\is_string($subscriberClass) && \class_exists($subscriberClass))
            ? \in_array(EventSubscriber::class, \class_implements($subscriberClass), true)
            : false;
    }