original_string: public function determineAccessToken($headerOnly = false)
      {
          if (!empty($this->getRequest()->headers->get('Authorization'))) {
              $accessToken = $this->getTokenType()->determineAccessTokenInHeader($this->getRequest());
          } elseif ($headerOnly === false && (! $this->getTokenType() instanceof MAC)) {
              $accessToken = ($this->getRequest()->server->get('REQUEST_METHOD') === 'GET')
                                  ? $this->getRequest()->query->get($this->tokenKey)
                                  : $this->getRequest()->request->get($this->tokenKey);
          }
  
          if (empty($accessToken)) {
              throw new InvalidRequestException('access token');
          }
  
          return $accessToken;
      }
code: public function determineAccessToken($headerOnly = false)
      {
          if (!empty($this->getRequest()->headers->get('Authorization'))) {
              $accessToken = $this->getTokenType()->determineAccessTokenInHeader($this->getRequest());
          } elseif ($headerOnly === false && (! $this->getTokenType() instanceof MAC)) {
              $accessToken = ($this->getRequest()->server->get('REQUEST_METHOD') === 'GET')
                                  ? $this->getRequest()->query->get($this->tokenKey)
                                  : $this->getRequest()->request->get($this->tokenKey);
          }
  
          if (empty($accessToken)) {
              throw new InvalidRequestException('access token');
          }
  
          return $accessToken;
      }
code_tokens: public function determineAccessToken ( $ headerOnly = false ) { if ( ! empty ( $ this -> getRequest ( ) -> headers -> get ( 'Authorization' ) ) ) { $ accessToken = $ this -> getTokenType ( ) -> determineAccessTokenInHeader ( $ this -> getRequest ( ) ) ; } elseif ( $ headerOnly === false && ( ! $ this -> getTokenType ( ) instanceof MAC ) ) { $ accessToken = ( $ this -> getRequest ( ) -> server -> get ( 'REQUEST_METHOD' ) === 'GET' ) ? $ this -> getRequest ( ) -> query -> get ( $ this -> tokenKey ) : $ this -> getRequest ( ) -> request -> get ( $ this -> tokenKey ) ; } if ( empty ( $ accessToken ) ) { throw new InvalidRequestException ( 'access token' ) ; } return $ accessToken ; }
docstring: Reads in the access token from the headers
  
  @param bool $headerOnly Limit Access Token to Authorization header
  
  @throws \EluminaElearning\OAuth2\Server\Exception\InvalidRequestException Thrown if there is no access token presented
  
  @return string
docstring_tokens: Reads in the access token from the headers