code: public function apply(EndpointInvoker $endpointInvoker, $result)
      {
          $contentType = $endpointInvoker->getRoute()->getContentType();
  
          foreach ($this->converters as $converter) {
  
              if ($converter->canHandle($contentType)) {
                  return $converter->apply($endpointInvoker, $result);
              }
          }
  
          throw new \RuntimeException("Cannot handle contentType '{$contentType}'");
      }
docs: @param EndpointInvoker $endpointInvoker
  @param                 $result
  
  @return mixed