original_string: private function realParseErrors(FormInterface $form, array &$results)
  	{
  		$errors = $form->getErrors();
  
  		if (count($errors) > 0)
  		{
  			$config      = $form->getConfig();
  			$name        = $form->getName();
  			$label       = $config->getOption('label');
  			$translation = $this->getTranslationDomain($form);
  			if (empty($label))
  			{
  				$label = ucfirst(trim(strtolower(preg_replace(array('/([A-Z])/', '/[_\s]+/'), array('_$1', ' '), $name))));
  			}
  
  			$results[] = array(
  				'name'        => $name,
  				'label'       => $label,
  				'errors'      => $errors,
  				'translation' => $translation,
  			);
  		}
  
  		$children = $form->all();
  		if (count($children) > 0)
  		{
  			foreach ($children as $child)
  			{
  				if ($child instanceof FormInterface)
  				{
  					$this->realParseErrors($child, $results);
  				}
  			}
  		}
  
  		return $results;
  	}
code: private function realParseErrors(FormInterface $form, array &$results)
  	{
  		$errors = $form->getErrors();
  
  		if (count($errors) > 0)
  		{
  			$config      = $form->getConfig();
  			$name        = $form->getName();
  			$label       = $config->getOption('label');
  			$translation = $this->getTranslationDomain($form);
  			if (empty($label))
  			{
  				$label = ucfirst(trim(strtolower(preg_replace(array('/([A-Z])/', '/[_\s]+/'), array('_$1', ' '), $name))));
  			}
  
  			$results[] = array(
  				'name'        => $name,
  				'label'       => $label,
  				'errors'      => $errors,
  				'translation' => $translation,
  			);
  		}
  
  		$children = $form->all();
  		if (count($children) > 0)
  		{
  			foreach ($children as $child)
  			{
  				if ($child instanceof FormInterface)
  				{
  					$this->realParseErrors($child, $results);
  				}
  			}
  		}
  
  		return $results;
  	}
code_tokens: private function realParseErrors ( FormInterface $ form , array & $ results ) { $ errors = $ form -> getErrors ( ) ; if ( count ( $ errors ) > 0 ) { $ config = $ form -> getConfig ( ) ; $ name = $ form -> getName ( ) ; $ label = $ config -> getOption ( 'label' ) ; $ translation = $ this -> getTranslationDomain ( $ form ) ; if ( empty ( $ label ) ) { $ label = ucfirst ( trim ( strtolower ( preg_replace ( array ( '/([A-Z])/' , '/[_\s]+/' ) , array ( '_$1' , ' ' ) , $ name ) ) ) ) ; } $ results [ ] = array ( 'name' => $ name , 'label' => $ label , 'errors' => $ errors , 'translation' => $ translation , ) ; } $ children = $ form -> all ( ) ; if ( count ( $ children ) > 0 ) { foreach ( $ children as $ child ) { if ( $ child instanceof FormInterface ) { $ this -> realParseErrors ( $ child , $ results ) ; } } } return $ results ; }
docstring: This does the actual job. Method travels through all levels of form recursively and gathers errors.
  
  @param   FormInterface $form
  @param   array         &$results
  
  @return  array
docstring_tokens: This does the actual job . Method travels through all levels of form recursively and gathers errors .