Conditions | 4 |
Paths | 5 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
20 | 11 | protected function buildMessage($violations): string |
|
21 | { |
||
22 | 11 | $message = ''; |
|
23 | 11 | foreach ($violations as $propertyName => $propertyViolations) { |
|
24 | 11 | if (! empty($propertyViolations)) { |
|
25 | 11 | $message = $message."Exception on property '".$propertyName."': "; |
|
26 | } |
||
27 | 11 | foreach ($propertyViolations as $violation) { |
|
28 | 11 | $message = $message.$violation->getMessage().'.'; |
|
29 | } |
||
30 | 11 | $message = $message."\n"; |
|
31 | } |
||
32 | |||
33 | 11 | return $message; |
|
34 | } |
||
54 |