private function applyTransitionAction(
        $object,
        StateLineStack $stateLineStack,
        $transitionName,
        $description,
        $transitionAction
    ) {
        $startState = $stateLineStack->getLastStateLine();

        if (!($startState instanceof StateLineInterface)) {
            throw new ObjectNotInitializedException();
        }

        /**
         * @var Transition $transition
         */
        $transition = $this
            ->machine
            ->$transitionAction(
                $startState->getName(),
                $transitionName
            );

        $stateLine = $this->createStateLine(
            $transition->getFinal()->getName(),
            $description
        );

        $stateLineStack->addStateLine($stateLine);

        $this
            ->machineEventDispatcher
            ->dispatchTransitionEvents(
                $this->machine,
                $object,
                $stateLineStack,
                $transition
            );

        return $stateLineStack;
    }
private function applyTransitionAction(
        $object,
        StateLineStack $stateLineStack,
        $transitionName,
        $description,
        $transitionAction
    ) {
        $startState = $stateLineStack->getLastStateLine();

        if (!($startState instanceof StateLineInterface)) {
            throw new ObjectNotInitializedException();
        }

        /**
         * @var Transition $transition
         */
        $transition = $this
            ->machine
            ->$transitionAction(
                $startState->getName(),
                $transitionName
            );

        $stateLine = $this->createStateLine(
            $transition->getFinal()->getName(),
            $description
        );

        $stateLineStack->addStateLine($stateLine);

        $this
            ->machineEventDispatcher
            ->dispatchTransitionEvents(
                $this->machine,
                $object,
                $stateLineStack,
                $transition
            );

        return $stateLineStack;
    }
private function applyTransitionAction ( $ object , StateLineStack $ stateLineStack , $ transitionName , $ description , $ transitionAction ) { $ startState = $ stateLineStack -> getLastStateLine ( ) ; if ( ! ( $ startState instanceof StateLineInterface ) ) { throw new ObjectNotInitializedException ( ) ; } /**
         * @var Transition $transition
         */ $ transition = $ this -> machine -> $ transitionAction ( $ startState -> getName ( ) , $ transitionName ) ; $ stateLine = $ this -> createStateLine ( $ transition -> getFinal ( ) -> getName ( ) , $ description ) ; $ stateLineStack -> addStateLine ( $ stateLine ) ; $ this -> machineEventDispatcher -> dispatchTransitionEvents ( $ this -> machine , $ object , $ stateLineStack , $ transition ) ; return $ stateLineStack ; }
Applies a transition action given a object and the kind of transition is
needed.

@param mixed          $object           Object
@param StateLineStack $stateLineStack   StateLine Stack
@param string         $transitionName   Transition name
@param string         $description      Description
@param string         $transitionAction Transition Action

@return StateLineStack StateLine stack given

@throws StateNotReachableException    State is not reachable
@throws ObjectNotInitializedException Object needs to be initialized in machine
Applies a transition action given a object and the kind of transition is needed .