src/StateMachine/Event.php
public function trigger(Payload $payload)
    {
        if (!$this->command) {
            return $this->targetState();
        }

        return call_user_func($this->command, $payload) ? $this->targetState() : $this->errorState();
    }
public function trigger(Payload $payload)
    {
        if (!$this->command) {
            return $this->targetState();
        }

        return call_user_func($this->command, $payload) ? $this->targetState() : $this->errorState();
    }
public function trigger ( Payload $ payload ) { if ( ! $ this -> command ) { return $ this -> targetState ( ) ; } return call_user_func ( $ this -> command , $ payload ) ? $ this -> targetState ( ) : $ this -> errorState ( ) ; }
Triggers event and return next state name or null if there is no state change

@param Payload $payload

@return null|string
Triggers event and return next state name or null if there is no state change