original_string: protected function parseResponse(Response $response)
      {
          $contentType = explode(';', $response->getHeader('content-type'))[0];
  
          switch ($contentType) {
              case 'application/json':
              case 'application/vnd.api+json':
                  return $response->json();
  
              case 'application/xml':
                  return $response->xml();
          }
  
          throw new RuntimeException("Unsupported returned content-type [$contentType]");
      }
code: protected function parseResponse(Response $response)
      {
          $contentType = explode(';', $response->getHeader('content-type'))[0];
  
          switch ($contentType) {
              case 'application/json':
              case 'application/vnd.api+json':
                  return $response->json();
  
              case 'application/xml':
                  return $response->xml();
          }
  
          throw new RuntimeException("Unsupported returned content-type [$contentType]");
      }
code_tokens: protected function parseResponse ( Response $ response ) { $ contentType = explode ( ';' , $ response -> getHeader ( 'content-type' ) ) [ 0 ] ; switch ( $ contentType ) { case 'application/json' : case 'application/vnd.api+json' : return $ response -> json ( ) ; case 'application/xml' : return $ response -> xml ( ) ; } throw new RuntimeException ( "Unsupported returned content-type [$contentType]" ) ; }
docstring: Parse the returned response.
  
  @param  \GuzzleHttp\Message\Response  $response
  @return array
  
  @throws RuntimeException
docstring_tokens: Parse the returned response .