public function publishEventAdvice(JoinPointInterface $joinPoint)
    {
        $event = array_values($joinPoint->getMethodArguments())[0];
        $this->broker->queueEvent($event);
    }
public function publishEventAdvice(JoinPointInterface $joinPoint)
    {
        $event = array_values($joinPoint->getMethodArguments())[0];
        $this->broker->queueEvent($event);
    }
public function publishEventAdvice ( JoinPointInterface $ joinPoint ) { $ event = array_values ( $ joinPoint -> getMethodArguments ( ) ) [ 0 ] ; $ this -> broker -> queueEvent ( $ event ) ; }
Publishes an event as soon as a method with an event annotation is called.

@param JoinPointInterface $joinPoint The join point.
@return void

@Flow\After("methodAnnotatedWith(Helmich\EventBroker\Annotations\Event)")
Publishes an event as soon as a method with an event annotation is called .