original_string: protected function _transition($transition)
      {
          if (!$this->_canTransition($transition)) {
              throw $this->_createCouldNotTransitionException(
                  $this->__('Cannot apply transition "%s"', $transition),
                  null,
                  null,
                  $transition
              );
          }
  
          return $this->_applyTransition($transition);
      }
code: protected function _transition($transition)
      {
          if (!$this->_canTransition($transition)) {
              throw $this->_createCouldNotTransitionException(
                  $this->__('Cannot apply transition "%s"', $transition),
                  null,
                  null,
                  $transition
              );
          }
  
          return $this->_applyTransition($transition);
      }
code_tokens: protected function _transition ( $ transition ) { if ( ! $ this -> _canTransition ( $ transition ) ) { throw $ this -> _createCouldNotTransitionException ( $ this -> __ ( 'Cannot apply transition "%s"' , $ transition ) , null , null , $ transition ) ; } return $ this -> _applyTransition ( $ transition ) ; }
docstring: Applies a transition.
  
  @since [*next-version*]
  
  @param string|Stringable $transition The transition code.
  
  @throws CouldNotTransitionExceptionInterface If the transition failed or was aborted.
  @throws StateMachineExceptionInterface       If an error was encountered during transition.
  
  @return StateMachineInterface The state machine with the new state.
docstring_tokens: Applies a transition .