original_string: public function getMessages(): array
      {
          $errors = $this->getErrors();
  
          $keys = array_keys($errors);
  
          return array_reduce($keys, function ($messages, $key) use ($errors) {
  
              $translated = $this->translator->getMessages($key, $errors[$key]);
  
              return array_merge($messages, $translated);
  
          }, []);
      }
code: public function getMessages(): array
      {
          $errors = $this->getErrors();
  
          $keys = array_keys($errors);
  
          return array_reduce($keys, function ($messages, $key) use ($errors) {
  
              $translated = $this->translator->getMessages($key, $errors[$key]);
  
              return array_merge($messages, $translated);
  
          }, []);
      }
code_tokens: public function getMessages ( ) : array { $ errors = $ this -> getErrors ( ) ; $ keys = array_keys ( $ errors ) ; return array_reduce ( $ keys , function ( $ messages , $ key ) use ( $ errors ) { $ translated = $ this -> translator -> getMessages ( $ key , $ errors [ $ key ] ) ; return array_merge ( $ messages , $ translated ) ; } , [ ] ) ; }
docstring: Return a list of translated error messages.
  
  @return array
docstring_tokens: Return a list of translated error messages .