This debugging function checks subscribers are
[
...
'string_event_name' => [static callable, static callable, ...],
...
]

@param array $subscribers

@return bool
341867
private function checkAllSubscribersAreStatic(array $subscribers): bool
    {
        $result = true;
        foreach ($subscribers as $eventName => $callableList) {
            if (is_string($eventName) === false || is_array($callableList) === false) {
                $result = false;
                break;
            }
            foreach ($callableList as $mightBeCallable) {
                $method = $this->parseStaticMethod($mightBeCallable);
                if ($method === null || $method->isStatic() === false) {
                    $result = false;
                    break;
                }
            }
        }

        return $result;
    }
777691
public static function hasListeners(string $event) : bool
    {
        if (! isset(Event::$listeners[$event]) || count(Event::$listeners[$event]) === 0) {
            return false;
        }

        return true;
    }
142238
protected function invokeSubscriberByInstance($subscriber, IEvent $event) {
        if (is_object($subscriber) && method_exists($subscriber, 'handle')) {
            $this->invokeSubscriber($subscriber, $event);

            return true;
        }

        return false;
    }
596318
protected function matches($other): bool
    {
        $this->resetProblems();
        if (!($other instanceof EventSubscriberInterface)) {
            $this->addProblem('Subscriber must implement \Symfony\Component\EventDispatcher\EventSubscriberInterface.');
            return false;
        }
        $subscribedEvents = call_user_func(array(get_class($other), 'getSubscribedEvents'));
        if (!is_array($subscribedEvents)) {
            $this->addProblem('getSubscribedEvents() must return an array.');
            return false;
        }
        foreach ($subscribedEvents as $event => $subscription) {
            /* @var $event string */
            /* @var $subscription mixed|string|array */
            $this->checkListener($other, $event, $subscription);
        }
        return !$this->hasProblems();
    }
27224
public function has($event)
    {
        list($event, $payload) = $this->parseEventAndPayload($event, []);

        return array_key_exists($event, $this->listeners);
    }
689805
private function addSubscribers(array $eventSubscribers)
    {
        foreach ($eventSubscribers as $eventSubscriber) {
            if (is_string($eventSubscriber)) {
                $eventSubscriber = new $eventSubscriber();
            } elseif (is_callable($eventSubscriber)) {
                $eventSubscriber = call_user_func($eventSubscriber, $this->dispatcher);
            }

            $this->dispatcher->addSubscriber($eventSubscriber);
        }

        return $this;
    }
325833
public function register($subscribers)
    {
        is_array($subscribers) || $subscribers = [$subscribers];

        foreach ($subscribers as $subscriber) {
            $this->registerSubscriber($subscriber);
        }
    }
41716
public function hasListeners($eventName = '')
    {
        $count = 0;

        if (empty($eventName)) {
            $count = count($this->listeners);
        } elseif (isset($this->listeners[$eventName])) {
            $count = count($this->listeners[$eventName]);
        }

        return (boolean) $count;
    }
412011
protected function isListener($listener)/*# : bool */
    {
        // object
        if (is_object($listener) &&
            $listener instanceof EventListenerInterface) {
            return true;
        }

        // static class name
        if (is_string($listener) &&
            is_a(
                $listener,
                '\\Phossa\\Event\\Interfaces\\EventListenerStaticInterface',
                true
            )) {
            return true;
        }

        return false;
    }
141813
public function it_should_have_listener_after_adding_subscriber(MockSubscriber $sub)
    {
        $events = [
            'test1' => [
                [
                    [
                        $sub,
                        'method1'
                    ],
                    [
                        $sub,
                        'method2'
                    ]
                ]
            ]
        ];
        $this->getListeners()
             ->shouldHaveCount(0);
        $sub->getSubscribedEvents()
            ->willReturn($events);
        $this->addSubscriber($sub);
        $this->getListeners()
             ->shouldHaveCount(1);
        $this->getListeners()
             ->shouldHaveKey('test1');
    }
569925
public function publish(DomainEvent $event)
    {
        $subscribers = [];
        $eventType = get_class($event);

        if (isset($this->subscribers[$eventType])) {
            $subscribers += $this->subscribers[$eventType];
        }

        if (isset($this->subscribers[DomainEvent::class])) {
            $subscribers += $this->subscribers[DomainEvent::class];
        }

        foreach ($subscribers as $subscriber) {
            $subscriber->handleEvent($event);
        }
    }
412871
static public function isSubscriptionType($subscriptionType) {
    return ((string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_NORMAL ||
        (string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_INFINITE ||
        (string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_ONETIME ||
        (string) $subscriptionType == Connect2PayClient::SUBSCRIPTION_TYPE_LIFETIME);
  }
989885
private function parseSubscription($subscription)
    {
        /** @var SubscriptionInterface $subscriptionItem */
        $subscriptionItem = $this->subscriptionFactory->create();

        foreach ($subscription->getData() as $key => $value) {
            $subscriptionItem->setData($key, $value);
        }

        return $subscriptionItem;
    }
691522
public boolean hasSubscriptions(Event event) {
        final ArrayList<Class<? extends Subscriber>> subscriberClasses = subscriptionMap.get(event.getClass());
        return subscriberClasses != null;
    }
402425
public boolean hasSubscribers(String eventName, boolean exact) {
        while (!StringUtils.isEmpty(eventName)) {
            if (hasSubscribers(eventName)) {
                return true;
            } else if (exact) {
                return false;
            } else {
                eventName = stripLevel(eventName);
            }
        }
        
        return false;
    }
1092036
public function hasListenerQueue($event): bool
    {
        if ($event instanceof EventInterface) {
            $event = $event->getName();
        }

        return isset($this->listeners[$event]);
    }
972990
public function hasListener($listener, $event = null): bool
    {
        if ($event) {
            if ($event instanceof EventInterface) {
                $event = $event->getName();
            }

            if (isset($this->listeners[$event])) {
                return $this->listeners[$event]->has($listener);
            }
        } else {
            foreach ($this->listeners as $queue) {
                if ($queue->has($listener)) {
                    return true;
                }
            }
        }

        return false;
    }