original_string: public function logout(): bool
      {
          if ($this->values->offsetExists('principal')) {
              $principal = $this->getPrincipal();
              $this->principal = Principal::getAnonymous();
  
              $this->session->destroy();
  
              $this->logger->info(
                  "Authentication logout: {user}",
                  ['user' => $principal]
              );
              return $this->publishLogout($principal);
          }
          return false;
      }
code: public function logout(): bool
      {
          if ($this->values->offsetExists('principal')) {
              $principal = $this->getPrincipal();
              $this->principal = Principal::getAnonymous();
  
              $this->session->destroy();
  
              $this->logger->info(
                  "Authentication logout: {user}",
                  ['user' => $principal]
              );
              return $this->publishLogout($principal);
          }
          return false;
      }
code_tokens: public function logout ( ) : bool { if ( $ this -> values -> offsetExists ( 'principal' ) ) { $ principal = $ this -> getPrincipal ( ) ; $ this -> principal = Principal :: getAnonymous ( ) ; $ this -> session -> destroy ( ) ; $ this -> logger -> info ( "Authentication logout: {user}" , [ 'user' => $ principal ] ) ; return $ this -> publishLogout ( $ principal ) ; } return false ; }
docstring: Logs out the currently authenticated principal.
  
  @return bool If a principal existed in the session to log out
docstring_tokens: Logs out the currently authenticated principal .