original_string: public function enrich(ModelInformationInterface $information)
      {
          $this->info = $information;
  
          try {
              foreach ($this->steps as $step) {
                  /** @var EnricherStepInterface $instance */
                  $instance = app($step);
  
                  $this->info = $instance->setEnricher($this)->enrich($this->info);
              }
  
          } catch (Exception $e) {
  
              $key     = null;
              $section = null;
              $message = $e->getMessage();
  
              if ($e instanceof ModelInformationEnrichmentException) {
                  $key     = $e->getKey();
                  $section = $e->getSection();
              } elseif ($e instanceof ModelConfigurationDataException) {
                  $message .= " ({$e->getDotKey()})";
              }
  
              // Wrap and decorate exceptions so it is easier to track the problem source
              throw (new ModelInformationEnrichmentException(
                  "{$information->modelClass()} model configuration issue: \n{$message}",
                  (int) $e->getCode(),
                  $e
              ))
                  ->setModelClass($information->modelClass())
                  ->setSection($section)
                  ->setKey($key);
          }
  
          return $information;
      }
code: public function enrich(ModelInformationInterface $information)
      {
          $this->info = $information;
  
          try {
              foreach ($this->steps as $step) {
                  /** @var EnricherStepInterface $instance */
                  $instance = app($step);
  
                  $this->info = $instance->setEnricher($this)->enrich($this->info);
              }
  
          } catch (Exception $e) {
  
              $key     = null;
              $section = null;
              $message = $e->getMessage();
  
              if ($e instanceof ModelInformationEnrichmentException) {
                  $key     = $e->getKey();
                  $section = $e->getSection();
              } elseif ($e instanceof ModelConfigurationDataException) {
                  $message .= " ({$e->getDotKey()})";
              }
  
              // Wrap and decorate exceptions so it is easier to track the problem source
              throw (new ModelInformationEnrichmentException(
                  "{$information->modelClass()} model configuration issue: \n{$message}",
                  (int) $e->getCode(),
                  $e
              ))
                  ->setModelClass($information->modelClass())
                  ->setSection($section)
                  ->setKey($key);
          }
  
          return $information;
      }
code_tokens: public function enrich ( ModelInformationInterface $ information ) { $ this -> info = $ information ; try { foreach ( $ this -> steps as $ step ) { /** @var EnricherStepInterface $instance */ $ instance = app ( $ step ) ; $ this -> info = $ instance -> setEnricher ( $ this ) -> enrich ( $ this -> info ) ; } } catch ( Exception $ e ) { $ key = null ; $ section = null ; $ message = $ e -> getMessage ( ) ; if ( $ e instanceof ModelInformationEnrichmentException ) { $ key = $ e -> getKey ( ) ; $ section = $ e -> getSection ( ) ; } elseif ( $ e instanceof ModelConfigurationDataException ) { $ message .= " ({$e->getDotKey()})" ; } // Wrap and decorate exceptions so it is easier to track the problem source throw ( new ModelInformationEnrichmentException ( "{$information->modelClass()} model configuration issue: \n{$message}" , ( int ) $ e -> getCode ( ) , $ e ) ) -> setModelClass ( $ information -> modelClass ( ) ) -> setSection ( $ section ) -> setKey ( $ key ) ; } return $ information ; }
docstring: Enriches a single model's information.
  
  Note that this does not offer contextual information for other models.
  
  @param ModelInformationInterface|ModelInformation $information
  @return ModelInformationInterface|ModelInformation
  @throws ModelInformationEnrichmentException
docstring_tokens: Enriches a single model s information .