| 1 | <?php |
||
| 6 | class Validator |
||
| 7 | { |
||
| 8 | /** @var \Wandu\Validator\TesterFactory */ |
||
| 9 | protected $tester; |
||
| 10 | |||
| 11 | /** @var string|\Wandu\Validator\Contracts\Rule */ |
||
| 12 | protected $rule; |
||
| 13 | |||
| 14 | public function __construct(TesterFactory $tester, $rule) |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @param mixed $data |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | 4 | public function assert($data) |
|
| 39 | 3 | ||
| 40 | 2 | /** |
|
| 41 | * @param mixed $data |
||
| 42 | 3 | * @return bool |
|
| 43 | */ |
||
| 44 | public function validate($data): bool |
||
| 55 | } |
||
| 56 |