Conditions | 4 |
Paths | 4 |
Total Lines | 9 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
23 | protected function checking(Rule $rule, $input) |
||
24 | { |
||
25 | if ($rule->e()->valid()) { |
||
26 | $rule->v()->validate($input) || $rule->e()->throws(); |
||
27 | } else { |
||
28 | try { |
||
29 | $rule->v()->check($input); |
||
30 | } catch (ValidationException $e) { |
||
31 | (new Message($e->setName($rule->f())->getMainMessage()))->throws(); |
||
32 | } |
||
36 |