| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 15 | public static function validate($value, array $options = [], ?Model $model = null) |
||
| 16 | { |
||
| 17 | $max = $options['value']; |
||
| 18 | $val = Respect::date('Y-m-d'); |
||
| 19 | $val->max($max); |
||
| 20 | if (!$val->validate($value)) { |
||
| 21 | throw new ValidatorException('Value is too large.'); |
||
| 22 | } |
||
| 23 | |||
| 24 | return $value; |
||
| 25 | } |
||
| 42 |