Total Complexity | 3 |
Total Lines | 42 |
Duplicated Lines | 0 % |
Coverage | 46.15% |
Changes | 0 |
1 | <?php |
||
16 | class ValidationException extends \Exception implements \JsonSerializable { |
||
17 | /** |
||
18 | * @var Validation |
||
19 | */ |
||
20 | private $validation; |
||
21 | |||
22 | /** |
||
23 | * Initialize an instance of the {@link ValidationException} class. |
||
24 | * |
||
25 | * @param Validation $validation The {@link Validation} object for the exception. |
||
26 | */ |
||
27 | 54 | public function __construct(Validation $validation) { |
|
30 | 54 | } |
|
31 | |||
32 | /** |
||
33 | * Specify data which should be serialized to JSON. |
||
34 | * |
||
35 | * @link http://php.net/manual/en/jsonserializable.jsonserialize.php |
||
36 | * @return mixed data which can be serialized by <b>json_encode</b>, |
||
37 | * which is a value of any type other than a resource. |
||
38 | */ |
||
39 | public function jsonSerialize() { |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * Get the validation object that contain specific errors. |
||
53 | * |
||
54 | * @return Validation Returns a validation object. |
||
55 | */ |
||
56 | 38 | public function getValidation() { |
|
60 |