Code cleanup

This commit is contained in:
Björn Fromme
2018-10-04 11:47:31 +02:00
parent 5c2e7619d0
commit 2b8312c32c
9 changed files with 17 additions and 16 deletions
@@ -40,11 +40,12 @@ class AjaxFormController extends ActionController
protected $emailService;
/**
* @param EmailService $service
* @param EmailService $emailService
*/
public function injectEmailService(EmailService $service)
public function __construct(EmailService $emailService)
{
$this->emailService = $service;
parent::__construct();
$this->emailService = $emailService;
}
/**
@@ -73,7 +74,7 @@ class AjaxFormController extends ActionController
if ($this->arguments->getValidationResults()->hasErrors()) {
foreach ($this->arguments->getValidationResults()->getFlattenedErrors() as $key => $errors)
{
list($formName, $fieldName) = explode('.', $key);
[ $formName, $fieldName ] = explode('.', $key);
$errorsRaw = [];
foreach ($errors as $error)
{