public function setEndState($stateId, $eventId)
    {
        if ($this->stateMachine->getState(StateMachine::STATE_FINAL) === null) {
            $this->stateMachine->addState(new FinalState(StateMachine::STATE_FINAL));
        }

        $this->addTransition($stateId, StateMachine::STATE_FINAL, $eventId);
    }
public function setEndState($stateId, $eventId)
    {
        if ($this->stateMachine->getState(StateMachine::STATE_FINAL) === null) {
            $this->stateMachine->addState(new FinalState(StateMachine::STATE_FINAL));
        }

        $this->addTransition($stateId, StateMachine::STATE_FINAL, $eventId);
    }
public function setEndState ( $ stateId , $ eventId ) { if ( $ this -> stateMachine -> getState ( StateMachine :: STATE_FINAL ) === null ) { $ this -> stateMachine -> addState ( new FinalState ( StateMachine :: STATE_FINAL ) ) ; } $ this -> addTransition ( $ stateId , StateMachine :: STATE_FINAL , $ eventId ) ; }
Sets the given state as an end state of the state machine.

@param string $stateId
@param string $eventId
Sets the given state as an end state of the state machine .