src/EventsTrait.php
private function isEventSubscriber($subscriberClass): bool
    {
        return \is_object($subscriberClass) || (\is_string($subscriberClass) && \class_exists($subscriberClass))
            ? \in_array(EventSubscriber::class, \class_implements($subscriberClass), true)
            : false;
    }
private function isEventSubscriber($subscriberClass): bool
    {
        return \is_object($subscriberClass) || (\is_string($subscriberClass) && \class_exists($subscriberClass))
            ? \in_array(EventSubscriber::class, \class_implements($subscriberClass), true)
            : false;
    }
Is an event subscriber.

@param $subscriberClass

@return bool