original_string: private function retrieveFieldDescription(AdminInterface $admin, $field)
      {
          $admin->getFormFieldDescriptions();
  
          $fieldDescription = $admin->getFormFieldDescription($field);
  
          if (!$fieldDescription) {
              throw new \RuntimeException(sprintf('The field "%s" does not exist.', $field));
          }
  
          if ('sonata_type_model_autocomplete' !== $fieldDescription->getType()) {
              throw new \RuntimeException(sprintf('Unsupported form type "%s" for field "%s".', $fieldDescription->getType(), $field));
          }
  
          return $fieldDescription;
      }
code: private function retrieveFieldDescription(AdminInterface $admin, $field)
      {
          $admin->getFormFieldDescriptions();
  
          $fieldDescription = $admin->getFormFieldDescription($field);
  
          if (!$fieldDescription) {
              throw new \RuntimeException(sprintf('The field "%s" does not exist.', $field));
          }
  
          if ('sonata_type_model_autocomplete' !== $fieldDescription->getType()) {
              throw new \RuntimeException(sprintf('Unsupported form type "%s" for field "%s".', $fieldDescription->getType(), $field));
          }
  
          return $fieldDescription;
      }
code_tokens: private function retrieveFieldDescription ( AdminInterface $ admin , $ field ) { $ admin -> getFormFieldDescriptions ( ) ; $ fieldDescription = $ admin -> getFormFieldDescription ( $ field ) ; if ( ! $ fieldDescription ) { throw new \ RuntimeException ( sprintf ( 'The field "%s" does not exist.' , $ field ) ) ; } if ( 'sonata_type_model_autocomplete' !== $ fieldDescription -> getType ( ) ) { throw new \ RuntimeException ( sprintf ( 'Unsupported form type "%s" for field "%s".' , $ fieldDescription -> getType ( ) , $ field ) ) ; } return $ fieldDescription ; }
docstring: Retrieve the field description given by field name.
  
  @param AdminInterface $admin
  @param string         $field
  
  @throws \RuntimeException
  
  @return \Symfony\Component\Form\FormInterface
docstring_tokens: Retrieve the field description given by field name .