original_string: public function isAvailable()
      {
          if (!empty($this->adapter)) {
              // adapter is already etablished
              return true;
          }
          $user = $this->getUser();
          $sessionDataStored = $user->getAuthSession($this->providerKey);
          if (empty($sessionDataStored)) {
              // for this user no session has been stored
              return false;
          }
          $hybridAuth = $this->getHybridAuth();
          $hybridAuth->restoreSessionData($sessionDataStored);
          if ($hybridAuth->isConnectedWith($this->providerKey)) {
              return true;
          }
          return false;
      }
code: public function isAvailable()
      {
          if (!empty($this->adapter)) {
              // adapter is already etablished
              return true;
          }
          $user = $this->getUser();
          $sessionDataStored = $user->getAuthSession($this->providerKey);
          if (empty($sessionDataStored)) {
              // for this user no session has been stored
              return false;
          }
          $hybridAuth = $this->getHybridAuth();
          $hybridAuth->restoreSessionData($sessionDataStored);
          if ($hybridAuth->isConnectedWith($this->providerKey)) {
              return true;
          }
          return false;
      }
code_tokens: public function isAvailable ( ) { if ( ! empty ( $ this -> adapter ) ) { // adapter is already etablished return true ; } $ user = $ this -> getUser ( ) ; $ sessionDataStored = $ user -> getAuthSession ( $ this -> providerKey ) ; if ( empty ( $ sessionDataStored ) ) { // for this user no session has been stored return false ; } $ hybridAuth = $ this -> getHybridAuth ( ) ; $ hybridAuth -> restoreSessionData ( $ sessionDataStored ) ; if ( $ hybridAuth -> isConnectedWith ( $ this -> providerKey ) ) { return true ; } return false ; }
docstring: for backend there is only one possibility to get a connection,
  and that is by stored Session
  @return bool
docstring_tokens: for backend there is only one possibility to get a connection and that is by stored Session