original_string: private function extractClientCredentials(ServerRequestInterface $request): array
      {
          // We first try to get the Authorization header, as this is the recommended way according to the spec
          if ($request->hasHeader('Authorization')) {
              // The value is "Basic xxx", we are interested in the last part
              $parts = explode(' ', $request->getHeaderLine('Authorization'));
              $value = base64_decode(end($parts));
  
              list($id, $secret) = explode(':', $value);
          } else {
              $postParams = $request->getParsedBody();
  
              $id = $postParams['client_id'] ?? null;
              $secret = $postParams['client_secret'] ?? null;
          }
  
          return [$id, $secret];
      }
code: private function extractClientCredentials(ServerRequestInterface $request): array
      {
          // We first try to get the Authorization header, as this is the recommended way according to the spec
          if ($request->hasHeader('Authorization')) {
              // The value is "Basic xxx", we are interested in the last part
              $parts = explode(' ', $request->getHeaderLine('Authorization'));
              $value = base64_decode(end($parts));
  
              list($id, $secret) = explode(':', $value);
          } else {
              $postParams = $request->getParsedBody();
  
              $id = $postParams['client_id'] ?? null;
              $secret = $postParams['client_secret'] ?? null;
          }
  
          return [$id, $secret];
      }
code_tokens: private function extractClientCredentials ( ServerRequestInterface $ request ) : array { // We first try to get the Authorization header, as this is the recommended way according to the spec if ( $ request -> hasHeader ( 'Authorization' ) ) { // The value is "Basic xxx", we are interested in the last part $ parts = explode ( ' ' , $ request -> getHeaderLine ( 'Authorization' ) ) ; $ value = base64_decode ( end ( $ parts ) ) ; list ( $ id , $ secret ) = explode ( ':' , $ value ) ; } else { $ postParams = $ request -> getParsedBody ( ) ; $ id = $ postParams [ 'client_id' ] ?? null ; $ secret = $ postParams [ 'client_secret' ] ?? null ; } return [ $ id , $ secret ] ; }
docstring: Extract the client credentials from Authorization header or POST data
docstring_tokens: Extract the client credentials from Authorization header or POST data