| Total Complexity | 4 |
| Total Lines | 17 |
| Duplicated Lines | 0 % |
| Coverage | 66.67% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class DateAfterValidation extends AbstractValidation implements ValidationInterface |
||
| 10 | { |
||
| 11 | |||
| 12 | 9 | public function isValid(ValueObject $data) |
|
| 13 | { |
||
| 14 | 9 | $valueTime = strtotime($data->value()); |
|
| 15 | 9 | $targetTime = strtotime($this->options[0]); |
|
| 16 | 9 | return $valueTime > $targetTime; |
|
| 17 | } |
||
| 18 | |||
| 19 | protected function getDateForCompare(){ |
||
| 20 | if(isset($this->options[0]) ) return $this->options[0]; |
||
| 21 | } |
||
| 22 | |||
| 23 | 6 | protected function errorMessage() |
|
| 26 | } |
||
| 27 | } |