Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | class ValidationError extends ControlledError |
||
19 | { |
||
20 | protected $code = Response::HTTP_UNPROCESSABLE_ENTITY; |
||
21 | |||
22 | protected $message = 'Unprocessable Entity'; |
||
23 | |||
24 | protected $description = 'Validation Error. These errors contains a key "constraintViolations" with all violations.'; |
||
25 | |||
26 | /** |
||
27 | * @var ConstraintViolationList |
||
28 | */ |
||
29 | protected $violations; |
||
30 | |||
31 | /** |
||
32 | * ValidationError constructor. |
||
33 | * |
||
34 | * @param ConstraintViolationList $violations |
||
35 | */ |
||
36 | 1 | public function __construct(ConstraintViolationList $violations) |
|
41 | 1 | } |
|
42 | |||
43 | /** |
||
44 | * @return array |
||
45 | */ |
||
46 | 1 | public function getViolationsArray() |
|
57 |