original_string: protected function signIn($duration = null): Token
      {
          $options = $this->signInOptions($duration);
  
          $response = $this->client->request(
              'GET',
              self::SIGN_IN_URL,
              $options
          );
  
          $data = \GuzzleHttp\json_decode($response->getBody(), true);
  
          $token = $this->tokenFromResponse($data);
          $this->logger->info(
              'Retrieved a new mpx token {token} for user {username} that expires on {date}.',
              [
                  'token' => $token->getValue(),
                  'username' => $this->user->getMpxUsername(),
                  'date' => date(DATE_ISO8601, $token->getExpiration()),
              ]
          );
  
          return $token;
      }
code: protected function signIn($duration = null): Token
      {
          $options = $this->signInOptions($duration);
  
          $response = $this->client->request(
              'GET',
              self::SIGN_IN_URL,
              $options
          );
  
          $data = \GuzzleHttp\json_decode($response->getBody(), true);
  
          $token = $this->tokenFromResponse($data);
          $this->logger->info(
              'Retrieved a new mpx token {token} for user {username} that expires on {date}.',
              [
                  'token' => $token->getValue(),
                  'username' => $this->user->getMpxUsername(),
                  'date' => date(DATE_ISO8601, $token->getExpiration()),
              ]
          );
  
          return $token;
      }
code_tokens: protected function signIn ( $ duration = null ) : Token { $ options = $ this -> signInOptions ( $ duration ) ; $ response = $ this -> client -> request ( 'GET' , self :: SIGN_IN_URL , $ options ) ; $ data = \ GuzzleHttp \ json_decode ( $ response -> getBody ( ) , true ) ; $ token = $ this -> tokenFromResponse ( $ data ) ; $ this -> logger -> info ( 'Retrieved a new mpx token {token} for user {username} that expires on {date}.' , [ 'token' => $ token -> getValue ( ) , 'username' => $ this -> user -> getMpxUsername ( ) , 'date' => date ( DATE_ISO8601 , $ token -> getExpiration ( ) ) , ] ) ; return $ token ; }
docstring: Sign in the user and return the current token.
  
  @param int $duration (optional) The number of seconds for which the token should be valid.
  
  @return Token
docstring_tokens: Sign in the user and return the current token .