| 1 | <?php |
||
| 18 | class ConditionRule extends AbstractRule |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var bool condition rule |
||
| 22 | */ |
||
| 23 | protected $condition; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Setup validation rule |
||
| 27 | * |
||
| 28 | * @param bool $condition |
||
| 29 | */ |
||
| 30 | public function __construct($condition) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Check input data |
||
| 37 | * |
||
| 38 | * @param mixed $input |
||
| 39 | * |
||
| 40 | * @return bool |
||
| 41 | */ |
||
| 42 | public function validate($input): bool |
||
| 46 | } |
||
| 47 |