| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class Sometimes extends AbstractRule |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Validates input. |
||
| 16 | * |
||
| 17 | * @param mixed $input |
||
| 18 | * |
||
| 19 | * @return bool |
||
| 20 | */ |
||
| 21 | public function isValid($input = null) |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * When true, validation will be bypassed if validated value is null or an empty string. |
||
| 28 | * |
||
| 29 | * @return bool |
||
| 30 | */ |
||
| 31 | public function emptyValueAllowed() |
||
| 36 |