src/EventsManager.php
private function fireQueue(SplPriorityQueue $queue, AbstractUserEvent $event)
    {
        $eventHappening = $event::getHappening();

        $iterator = clone $queue;
        $iterator->top();

        $arguments = null;
        $status = null;

        while ($iterator->valid()) {
            $handler = $iterator->current();
            $iterator->next();

            if (is_object($handler)) {
                if ($handler instanceof \Closure) {
                    $arguments = $arguments ?: [$event];
                    $status = call_user_func_array($handler, $arguments);
                } else {
                    if (method_exists($handler, $eventHappening)) {
                        $status = $handler->{$eventHappening}($event);
                    }
                }
            }
        }

        return $status;
    }
private function fireQueue(SplPriorityQueue $queue, AbstractUserEvent $event)
    {
        $eventHappening = $event::getHappening();

        $iterator = clone $queue;
        $iterator->top();

        $arguments = null;
        $status = null;

        while ($iterator->valid()) {
            $handler = $iterator->current();
            $iterator->next();

            if (is_object($handler)) {
                if ($handler instanceof \Closure) {
                    $arguments = $arguments ?: [$event];
                    $status = call_user_func_array($handler, $arguments);
                } else {
                    if (method_exists($handler, $eventHappening)) {
                        $status = $handler->{$eventHappening}($event);
                    }
                }
            }
        }

        return $status;
    }
Internal handler to call a queue of events.

@param  SplPriorityQueue $queue
@param  AbstractUserEvent $event
@return mixed|null