Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
26 | 3 | public static function onCommand($command, ConstraintViolationListInterface $violations) |
|
27 | { |
||
28 | 3 | $exception = new static( |
|
29 | 3 | 'Validation failed for ' . get_class($command) . |
|
30 | 3 | ' with ' . $violations->count() . ' violation(s).' |
|
31 | ); |
||
32 | |||
33 | 3 | $exception->command = $command; |
|
34 | 3 | $exception->violations = $violations; |
|
35 | |||
36 | 3 | return $exception; |
|
37 | } |
||
38 | |||
55 |