code: private function rankAcceptMediaTypeHeaders(array $mediaTypeHeaders): array
      {
          usort($mediaTypeHeaders, [$this, 'compareAcceptMediaTypeHeaders']);
          $rankedMediaTypeHeaders = array_filter($mediaTypeHeaders, [$this, 'filterZeroScores']);
  
          // Have to return the values because the keys aren't updated in array_filter()
          return array_values($rankedMediaTypeHeaders);
      }
docs: Ranks the media type headers by quality, and then by specificity
  
  @param AcceptMediaTypeHeaderValue[] $mediaTypeHeaders The list of media type headers to rank
  @return AcceptMediaTypeHeaderValue[] The ranked list of media type headers