Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | 87 | public function validate(ValueObject $data){ |
|
35 | 87 | $this->data = $data; |
|
36 | 87 | if (! $this->isValid($data) ) { |
|
37 | 49 | $this->error = $this->getErrorMessage(); |
|
38 | 49 | $this->afterFailedValidation(); |
|
39 | 49 | return false; |
|
40 | } |
||
41 | 67 | $this->afterSuccessValidation(); |
|
42 | 67 | return true; |
|
43 | } |
||
62 | } |