original_string: public function getSourceFile(MediaInterface $media) {
      // Get the source field for the media type.
      $source_field = $this->getSourceFieldName($media->bundle());
  
      if (empty($source_field)) {
        throw new NotFoundHttpException("Source field not set for {$media->bundle()} media");
      }
  
      // Get the file from the media.
      $files = $media->get($source_field)->referencedEntities();
      $file = reset($files);
  
      return $file;
    }
code: public function getSourceFile(MediaInterface $media) {
      // Get the source field for the media type.
      $source_field = $this->getSourceFieldName($media->bundle());
  
      if (empty($source_field)) {
        throw new NotFoundHttpException("Source field not set for {$media->bundle()} media");
      }
  
      // Get the file from the media.
      $files = $media->get($source_field)->referencedEntities();
      $file = reset($files);
  
      return $file;
    }
code_tokens: public function getSourceFile ( MediaInterface $ media ) { // Get the source field for the media type. $ source_field = $ this -> getSourceFieldName ( $ media -> bundle ( ) ) ; if ( empty ( $ source_field ) ) { throw new NotFoundHttpException ( "Source field not set for {$media->bundle()} media" ) ; } // Get the file from the media. $ files = $ media -> get ( $ source_field ) -> referencedEntities ( ) ; $ file = reset ( $ files ) ; return $ file ; }
docstring: Gets the value of a source field for a Media.
  
  @param \Drupal\media\MediaInterface $media
  Media whose source field you are searching for.
  
  @return \Drupal\file\FileInterface
  File if it exists
  
  @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
docstring_tokens: Gets the value of a source field for a Media .