| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public static function fromConstraintValidation(ConstraintViolation $violation, ?\Throwable $previous = null): self |
||
| 16 | { |
||
| 17 | $message = sprintf( |
||
| 18 | 'Validation Constraint: [%s] [%s] [%s]', |
||
| 19 | $violation->getPropertyPath(), |
||
| 20 | (string) $violation->getCode(), |
||
| 21 | (string) $violation->getMessage(), |
||
| 22 | ); |
||
| 23 | |||
| 24 | return new self($message, previous: $previous); |
||
| 25 | } |
||
| 27 |