Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | protected function convertViolationsToErrormessage( |
||
25 | ConstraintViolationListInterface $violationList, |
||
26 | NotificationInterface $notification, |
||
27 | string $fieldName |
||
28 | ) { |
||
29 | if (0 !== count($violationList)) { |
||
30 | /** @var ConstraintViolationInterface $violation */ |
||
31 | foreach ($violationList as $violation) { |
||
32 | $errorMessage = new BaseErrorMessage(); |
||
33 | $errorMessage->setKey($fieldName); |
||
34 | $errorMessage->setMessage($violation->getMessage()); |
||
35 | $notification->addMessage($errorMessage); |
||
36 | } |
||
40 |