original_string: public function getImpersonatingUser()
      {
          if ($this->isGranted('ROLE_PREVIOUS_ADMIN')) {
              foreach ($this->tokenStorage->getToken()->getRoles() as $role) {
                  if ($role instanceof SwitchUserRole) {
                      return $role->getSource()->getUser();
                  }
              }
          }
      }
code: public function getImpersonatingUser()
      {
          if ($this->isGranted('ROLE_PREVIOUS_ADMIN')) {
              foreach ($this->tokenStorage->getToken()->getRoles() as $role) {
                  if ($role instanceof SwitchUserRole) {
                      return $role->getSource()->getUser();
                  }
              }
          }
      }
code_tokens: public function getImpersonatingUser ( ) { if ( $ this -> isGranted ( 'ROLE_PREVIOUS_ADMIN' ) ) { foreach ( $ this -> tokenStorage -> getToken ( ) -> getRoles ( ) as $ role ) { if ( $ role instanceof SwitchUserRole ) { return $ role -> getSource ( ) -> getUser ( ) ; } } } }
docstring: When impersonating a user, it returns the original user who started
  the impersonation.
  
  @return mixed
docstring_tokens: When impersonating a user it returns the original user who started the impersonation .