original_string: protected function github(Oauth2Service\GitHub $github, TokenInterface $token)
      {
          $emails = json_decode($github->request('user/emails'), true);
          $user   = json_decode($github->request('user'), true);
  
          $loginRequest = new LoginRequest(
              'github',
              $user['id'],
              $token->getAccessToken(),
              $token->getEndOfLife() > 0 ? $token->getEndOfLife() : 0,
              $token->getRefreshToken(),
              $emails
          );
  
          return $loginRequest;
      }
code: protected function github(Oauth2Service\GitHub $github, TokenInterface $token)
      {
          $emails = json_decode($github->request('user/emails'), true);
          $user   = json_decode($github->request('user'), true);
  
          $loginRequest = new LoginRequest(
              'github',
              $user['id'],
              $token->getAccessToken(),
              $token->getEndOfLife() > 0 ? $token->getEndOfLife() : 0,
              $token->getRefreshToken(),
              $emails
          );
  
          return $loginRequest;
      }
code_tokens: protected function github ( Oauth2Service \ GitHub $ github , TokenInterface $ token ) { $ emails = json_decode ( $ github -> request ( 'user/emails' ) , true ) ; $ user = json_decode ( $ github -> request ( 'user' ) , true ) ; $ loginRequest = new LoginRequest ( 'github' , $ user [ 'id' ] , $ token -> getAccessToken ( ) , $ token -> getEndOfLife ( ) > 0 ? $ token -> getEndOfLife ( ) : 0 , $ token -> getRefreshToken ( ) , $ emails ) ; return $ loginRequest ; }
docstring: Request access token from GitHub and return a LoginRequest object for logging into our app
  
  @param  Oauth2Service\GitHub $github
  @param  TokenInterface       $token
  @return LoginRequest
docstring_tokens: Request access token from GitHub and return a LoginRequest object for logging into our app