public function getTransitionByStartingStateAndTransitionName(
        $stateName,
        $transitionName
    ) {
        $transition = array_filter(
            $this->transitions,
            function (Transition $transition) use ($stateName, $transitionName) {
                return
                    $transition->getName() === $transitionName &&
                    $transition->getStart()->getName() === $stateName;
            }
        );

        return !empty($transition)
            ? reset($transition)
            : null;
    }
public function getTransitionByStartingStateAndTransitionName(
        $stateName,
        $transitionName
    ) {
        $transition = array_filter(
            $this->transitions,
            function (Transition $transition) use ($stateName, $transitionName) {
                return
                    $transition->getName() === $transitionName &&
                    $transition->getStart()->getName() === $stateName;
            }
        );

        return !empty($transition)
            ? reset($transition)
            : null;
    }
public function getTransitionByStartingStateAndTransitionName ( $ stateName , $ transitionName ) { $ transition = array_filter ( $ this -> transitions , function ( Transition $ transition ) use ( $ stateName , $ transitionName ) { return $ transition -> getName ( ) === $ transitionName && $ transition -> getStart ( ) -> getName ( ) === $ stateName ; } ) ; return ! empty ( $ transition ) ? reset ( $ transition ) : null ; }
Get transition starting state name and transition name.

@param string $stateName      State name
@param string $transitionName Transition name

@return Transition|null Transition if exists
Get transition starting state name and transition name .