Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function verdict($value, Rule $rule): VerdictInterface |
||
16 | { |
||
17 | $this->validateOptions($rule->getOptions()); |
||
18 | |||
19 | if (is_null($value)) { |
||
20 | return Verdict::passing($rule); |
||
21 | } |
||
22 | |||
23 | return Verdict::create( |
||
24 | 1 === preg_match($rule->getOption('pattern'), $value), |
||
25 | $rule |
||
26 | ); |
||
27 | } |
||
28 | |||
39 |