original_string: private function attemptExitUser(Request $request)
      {
          if (null === ($currentToken = $this->tokenStorage->getToken()) || null === $original = $this->getOriginalToken($currentToken)) {
              throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.');
          }
  
          if (null !== $this->dispatcher && $original->getUser() instanceof UserInterface) {
              $user = $this->provider->refreshUser($original->getUser());
              $switchEvent = new SwitchUserEvent($request, $user, $original);
              $this->dispatcher->dispatch($switchEvent, SecurityEvents::SWITCH_USER);
              $original = $switchEvent->getToken();
          }
  
          return $original;
      }
code: private function attemptExitUser(Request $request)
      {
          if (null === ($currentToken = $this->tokenStorage->getToken()) || null === $original = $this->getOriginalToken($currentToken)) {
              throw new AuthenticationCredentialsNotFoundException('Could not find original Token object.');
          }
  
          if (null !== $this->dispatcher && $original->getUser() instanceof UserInterface) {
              $user = $this->provider->refreshUser($original->getUser());
              $switchEvent = new SwitchUserEvent($request, $user, $original);
              $this->dispatcher->dispatch($switchEvent, SecurityEvents::SWITCH_USER);
              $original = $switchEvent->getToken();
          }
  
          return $original;
      }
code_tokens: private function attemptExitUser ( Request $ request ) { if ( null === ( $ currentToken = $ this -> tokenStorage -> getToken ( ) ) || null === $ original = $ this -> getOriginalToken ( $ currentToken ) ) { throw new AuthenticationCredentialsNotFoundException ( 'Could not find original Token object.' ) ; } if ( null !== $ this -> dispatcher && $ original -> getUser ( ) instanceof UserInterface ) { $ user = $ this -> provider -> refreshUser ( $ original -> getUser ( ) ) ; $ switchEvent = new SwitchUserEvent ( $ request , $ user , $ original ) ; $ this -> dispatcher -> dispatch ( $ switchEvent , SecurityEvents :: SWITCH_USER ) ; $ original = $ switchEvent -> getToken ( ) ; } return $ original ; }
docstring: Attempts to exit from an already switched user.
  
  @return TokenInterface The original TokenInterface instance
  
  @throws AuthenticationCredentialsNotFoundException
docstring_tokens: Attempts to exit from an already switched user .