original_string: public function logout()
      {
          $result = array();
  
          $user = $this->user->get($this->user->getId());
          $this->hook->attach('user.logout.before', $user, $result, $this);
  
          if (!empty($result)) {
              return (array) $result;
          }
  
          $this->session->delete();
          $result = $this->getResultLogOut($user);
  
          $this->hook->attach('user.logout.after', $user, $result, $this);
          return (array) $result;
      }
code: public function logout()
      {
          $result = array();
  
          $user = $this->user->get($this->user->getId());
          $this->hook->attach('user.logout.before', $user, $result, $this);
  
          if (!empty($result)) {
              return (array) $result;
          }
  
          $this->session->delete();
          $result = $this->getResultLogOut($user);
  
          $this->hook->attach('user.logout.after', $user, $result, $this);
          return (array) $result;
      }
code_tokens: public function logout ( ) { $ result = array ( ) ; $ user = $ this -> user -> get ( $ this -> user -> getId ( ) ) ; $ this -> hook -> attach ( 'user.logout.before' , $ user , $ result , $ this ) ; if ( ! empty ( $ result ) ) { return ( array ) $ result ; } $ this -> session -> delete ( ) ; $ result = $ this -> getResultLogOut ( $ user ) ; $ this -> hook -> attach ( 'user.logout.after' , $ user , $ result , $ this ) ; return ( array ) $ result ; }
docstring: Logs out the current user
  @return array
docstring_tokens: Logs out the current user