public function getTransitionsByFinalState($stateName)
    {
        return array_filter(
            $this->transitions,
            function (Transition $transition) use ($stateName) {
                return $transition
                    ->getFinal()
                    ->getName() === $stateName;
            }
        );
    }
public function getTransitionsByFinalState($stateName)
    {
        return array_filter(
            $this->transitions,
            function (Transition $transition) use ($stateName) {
                return $transition
                    ->getFinal()
                    ->getName() === $stateName;
            }
        );
    }
public function getTransitionsByFinalState ( $ stateName ) { return array_filter ( $ this -> transitions , function ( Transition $ transition ) use ( $ stateName ) { return $ transition -> getFinal ( ) -> getName ( ) === $ stateName ; } ) ; }
Get transitions given the name of the final state name.

@param string $stateName State name

@return array|null Transitions with specific final state
Get transitions given the name of the final state name .