original_string: protected function getMorphableModelsForFieldData(ModelFormFieldDataInterface $data)
      {
          $modelsOption = array_get($data->options(), 'models', []);
  
          // Users may have set the string value with the model class, instead of a class => array value pair
          $modelClasses = array_map(
              function ($key, $value) {
                  if (is_string($value)) {
                      return $value;
                  }
  
                  return $key;
              },
              array_keys($modelsOption),
              array_values($modelsOption)
          );
  
          return array_unique($modelClasses);
      }
code: protected function getMorphableModelsForFieldData(ModelFormFieldDataInterface $data)
      {
          $modelsOption = array_get($data->options(), 'models', []);
  
          // Users may have set the string value with the model class, instead of a class => array value pair
          $modelClasses = array_map(
              function ($key, $value) {
                  if (is_string($value)) {
                      return $value;
                  }
  
                  return $key;
              },
              array_keys($modelsOption),
              array_values($modelsOption)
          );
  
          return array_unique($modelClasses);
      }
code_tokens: protected function getMorphableModelsForFieldData ( ModelFormFieldDataInterface $ data ) { $ modelsOption = array_get ( $ data -> options ( ) , 'models' , [ ] ) ; // Users may have set the string value with the model class, instead of a class => array value pair $ modelClasses = array_map ( function ( $ key , $ value ) { if ( is_string ( $ value ) ) { return $ value ; } return $ key ; } , array_keys ( $ modelsOption ) , array_values ( $ modelsOption ) ) ; return array_unique ( $ modelClasses ) ; }
docstring: Returns the model class names that the model may be related to.
  
  @param ModelFormFieldDataInterface|ModelFormFieldData $data
  @return string[]
docstring_tokens: Returns the model class names that the model may be related to .