| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 49 | public function check(mixed $valueToCheck): RulesInterface |
||
| 50 | { |
||
| 51 | $rules = implode('|', $this->rules); |
||
| 52 | |||
| 53 | if (preg_match("#$rules#i", $valueToCheck, $matches)) { |
||
| 54 | throw new InvalidArgumentException( |
||
| 55 | sprintf('Insecure parameter detected with value [%s]', $valueToCheck) |
||
| 56 | ); |
||
| 57 | } |
||
| 58 | |||
| 59 | return $this; |
||
| 60 | } |
||
| 62 |