1 | <?php declare(strict_types = 1); |
||
14 | class ValidationResult |
||
15 | { |
||
16 | /** |
||
17 | * @var bool |
||
18 | */ |
||
19 | private $valid; |
||
20 | |||
21 | /** |
||
22 | * @var string[] |
||
23 | */ |
||
24 | private $errorMessages; |
||
25 | |||
26 | /** |
||
27 | * ValidationResult constructor. |
||
28 | * |
||
29 | * @param bool $valid |
||
30 | * @param string[] $errorMessages |
||
31 | */ |
||
32 | public function __construct(bool $valid, array $errorMessages) |
||
37 | |||
38 | /** |
||
39 | * @return bool |
||
40 | */ |
||
41 | public function isValid(): bool |
||
45 | |||
46 | /** |
||
47 | * @return string[] |
||
48 | */ |
||
49 | public function getErrorMessages(): array |
||
53 | } |
||
54 |