private function checkStates(TransitionChain $transitionChain)
    {
        /**
         * @var Transition $transition
         */
        foreach ($transitionChain->getTransitions() as $transition) {
            $initialStateName = $transition->getStart()->getName();

            if ($initialStateName === $this->pointOfEntry) {
                continue;
            }

            if (!$this->transitionChain->getTransitionsByFinalState($initialStateName)) {
                throw new StateNotValidException($initialStateName);
            }
        }

        return $this;
    }
private function checkStates(TransitionChain $transitionChain)
    {
        /**
         * @var Transition $transition
         */
        foreach ($transitionChain->getTransitions() as $transition) {
            $initialStateName = $transition->getStart()->getName();

            if ($initialStateName === $this->pointOfEntry) {
                continue;
            }

            if (!$this->transitionChain->getTransitionsByFinalState($initialStateName)) {
                throw new StateNotValidException($initialStateName);
            }
        }

        return $this;
    }
private function checkStates ( TransitionChain $ transitionChain ) { /**
         * @var Transition $transition
         */ foreach ( $ transitionChain -> getTransitions ( ) as $ transition ) { $ initialStateName = $ transition -> getStart ( ) -> getName ( ) ; if ( $ initialStateName === $ this -> pointOfEntry ) { continue ; } if ( ! $ this -> transitionChain -> getTransitionsByFinalState ( $ initialStateName ) ) { throw new StateNotValidException ( $ initialStateName ) ; } } return $ this ; }
Compile next states of each state.

@param TransitionChain $transitionChain Transition chain

@return $this Self object

@throws StateNotValidException state is not valid
Compile next states of each state .