original_string: public function getValidationErrors()
      {
          $fields = $this->getFields();
          if (!$fields) {
              return [];
          }
  
          $result = [];
          foreach ($fields as $field) {
              if ($field instanceof AbstractFormField) {
                  if (!$field->isValid()) {
                      $result = array_merge($result, $field->getErrorMessages());
                  }
              }
          }
  
          return $result;
      }
code: public function getValidationErrors()
      {
          $fields = $this->getFields();
          if (!$fields) {
              return [];
          }
  
          $result = [];
          foreach ($fields as $field) {
              if ($field instanceof AbstractFormField) {
                  if (!$field->isValid()) {
                      $result = array_merge($result, $field->getErrorMessages());
                  }
              }
          }
  
          return $result;
      }
code_tokens: public function getValidationErrors ( ) { $ fields = $ this -> getFields ( ) ; if ( ! $ fields ) { return [ ] ; } $ result = [ ] ; foreach ( $ fields as $ field ) { if ( $ field instanceof AbstractFormField ) { if ( ! $ field -> isValid ( ) ) { $ result = array_merge ( $ result , $ field -> getErrorMessages ( ) ) ; } } } return $ result ; }
docstring: Get an array with all validation errors
  @return array
docstring_tokens: Get an array with all validation errors