1 | <?php |
||
15 | class ErrorsStore |
||
16 | { |
||
17 | /** |
||
18 | * @var ValidationError[] |
||
19 | */ |
||
20 | private $errors = []; |
||
21 | |||
22 | /** |
||
23 | * @return ErrorsStore |
||
24 | */ |
||
25 | 1 | public function clear() : ErrorsStore |
|
31 | |||
32 | /** |
||
33 | * @param ValidationError $error |
||
34 | */ |
||
35 | 1 | public function add(ValidationError $error) |
|
39 | |||
40 | /** |
||
41 | * @return bool |
||
42 | */ |
||
43 | 1 | public function isHasErrors() : bool |
|
47 | |||
48 | /** |
||
49 | * @return ValidationError[] |
||
50 | */ |
||
51 | public function iterate() |
||
57 | |||
58 | /** |
||
59 | * @return array |
||
60 | */ |
||
61 | public function toArray() : array |
||
70 | } |