src/Traits/EventsTrait.php
protected function dispatch(string $name, Event $event = null): Event
    {
        if (empty(self::$dispatchers[static::class])) {
            //We can bypass dispatcher creation
            return $event;
        }

        return static::getEventDispatcher()->dispatch($name, $event);
    }
protected function dispatch(string $name, Event $event = null): Event
    {
        if (empty(self::$dispatchers[static::class])) {
            //We can bypass dispatcher creation
            return $event;
        }

        return static::getEventDispatcher()->dispatch($name, $event);
    }
protected function dispatch ( string $ name , Event $ event = null ) : Event { if ( empty ( self :: $ dispatchers [ static :: class ] ) ) { //We can bypass dispatcher creation return $ event ; } return static :: getEventDispatcher ( ) -> dispatch ( $ name , $ event ) ; }
Dispatch event. If no dispatched associated even will be returned without dispatching.

@param string     $name  Event name.
@param Event|null $event Event class if any.

@return Event
Dispatch event . If no dispatched associated even will be returned without dispatching .