original_string: public function determineFormDisplayStrategy(ModelRelationData $data)
      {
          $type = null;
  
          switch ($data->type) {
  
              case RelationType::BELONGS_TO:
              case RelationType::BELONGS_TO_THROUGH:
              case RelationType::MORPH_ONE:
              case RelationType::HAS_ONE:
                  $type = FormDisplayStrategy::RELATION_SINGLE_AUTOCOMPLETE;
                  break;
  
              case RelationType::BELONGS_TO_MANY:
              case RelationType::HAS_MANY:
              case RelationType::MORPH_MANY:
              case RelationType::MORPH_TO_MANY:
              case RelationType::MORPHED_BY_MANY:
                  $type = FormDisplayStrategy::RELATION_PLURAL_AUTOCOMPLETE;
                  break;
  
              case RelationType::MORPH_TO:
                  $type = FormDisplayStrategy::RELATION_SINGLE_MORPH_AUTOCOMPLETE;
                  break;
          }
  
          return $type;
      }
code: public function determineFormDisplayStrategy(ModelRelationData $data)
      {
          $type = null;
  
          switch ($data->type) {
  
              case RelationType::BELONGS_TO:
              case RelationType::BELONGS_TO_THROUGH:
              case RelationType::MORPH_ONE:
              case RelationType::HAS_ONE:
                  $type = FormDisplayStrategy::RELATION_SINGLE_AUTOCOMPLETE;
                  break;
  
              case RelationType::BELONGS_TO_MANY:
              case RelationType::HAS_MANY:
              case RelationType::MORPH_MANY:
              case RelationType::MORPH_TO_MANY:
              case RelationType::MORPHED_BY_MANY:
                  $type = FormDisplayStrategy::RELATION_PLURAL_AUTOCOMPLETE;
                  break;
  
              case RelationType::MORPH_TO:
                  $type = FormDisplayStrategy::RELATION_SINGLE_MORPH_AUTOCOMPLETE;
                  break;
          }
  
          return $type;
      }
code_tokens: public function determineFormDisplayStrategy ( ModelRelationData $ data ) { $ type = null ; switch ( $ data -> type ) { case RelationType :: BELONGS_TO : case RelationType :: BELONGS_TO_THROUGH : case RelationType :: MORPH_ONE : case RelationType :: HAS_ONE : $ type = FormDisplayStrategy :: RELATION_SINGLE_AUTOCOMPLETE ; break ; case RelationType :: BELONGS_TO_MANY : case RelationType :: HAS_MANY : case RelationType :: MORPH_MANY : case RelationType :: MORPH_TO_MANY : case RelationType :: MORPHED_BY_MANY : $ type = FormDisplayStrategy :: RELATION_PLURAL_AUTOCOMPLETE ; break ; case RelationType :: MORPH_TO : $ type = FormDisplayStrategy :: RELATION_SINGLE_MORPH_AUTOCOMPLETE ; break ; } return $ type ; }
docstring: Determines a form display strategy string for given relation data.
  
  @param ModelRelationData $data
  @return string|null
docstring_tokens: Determines a form display strategy string for given relation data .