| Total Complexity | 5 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class ValidationResult |
||
| 8 | { |
||
| 9 | private $result; |
||
| 10 | private $validated; |
||
| 11 | private $errors; |
||
| 12 | |||
| 13 | 1 | public function __construct($result, $validated, $errors) |
|
| 14 | { |
||
| 15 | 1 | $this->result = $result; |
|
| 16 | 1 | $this->validated = $validated; |
|
| 17 | 1 | $this->errors = $errors; |
|
| 18 | 1 | } |
|
| 19 | |||
| 20 | 1 | public function success(){ |
|
| 21 | 1 | return $this->result; |
|
| 22 | } |
||
| 23 | |||
| 24 | 1 | public function fails(){ |
|
| 25 | 1 | return ! $this->success(); |
|
| 26 | } |
||
| 27 | |||
| 28 | 1 | public function data(){ |
|
| 30 | } |
||
| 31 | |||
| 32 | 1 | public function errors(){ |
|
| 34 | } |
||
| 35 | |||
| 36 | } |