original_string: protected function enrichReferenceData(ModelMetaReferenceInterface $data)
      {
          // If the source/strategy are not set, check if we can use the model's reference data
          if (null === $data->source() || null === $data->strategy()) {
  
              // todo: take into account that this might be a morph relation...
  
              if ($info = $this->getModelInformation($data->model())) {
  
                  if (null === $data->source()) {
                      $data->source = $info->reference->source;
                  }
                  if (null === $data->strategy()) {
                      $data->strategy = $info->reference->strategy;
                  }
              }
          }
  
          return $data;
      }
code: protected function enrichReferenceData(ModelMetaReferenceInterface $data)
      {
          // If the source/strategy are not set, check if we can use the model's reference data
          if (null === $data->source() || null === $data->strategy()) {
  
              // todo: take into account that this might be a morph relation...
  
              if ($info = $this->getModelInformation($data->model())) {
  
                  if (null === $data->source()) {
                      $data->source = $info->reference->source;
                  }
                  if (null === $data->strategy()) {
                      $data->strategy = $info->reference->strategy;
                  }
              }
          }
  
          return $data;
      }
code_tokens: protected function enrichReferenceData ( ModelMetaReferenceInterface $ data ) { // If the source/strategy are not set, check if we can use the model's reference data if ( null === $ data -> source ( ) || null === $ data -> strategy ( ) ) { // todo: take into account that this might be a morph relation... if ( $ info = $ this -> getModelInformation ( $ data -> model ( ) ) ) { if ( null === $ data -> source ( ) ) { $ data -> source = $ info -> reference -> source ; } if ( null === $ data -> strategy ( ) ) { $ data -> strategy = $ info -> reference -> strategy ; } } } return $ data ; }
docstring: Enriches refernce data object as required.
  
  @param ModelMetaReferenceInterface|ModelMetaReference $data
  @return ModelMetaReferenceInterface
docstring_tokens: Enriches refernce data object as required .