| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | protected function validateKey($key) |
||
| 20 | { |
||
| 21 | if (!is_string($key) || $key === '') { |
||
| 22 | throw new InvalidArgumentException('$key must be a valid non empty string'); |
||
| 23 | } |
||
| 24 | |||
| 25 | if (preg_match('#[{}()/\\\@:]#', $key) > 0) { |
||
| 26 | throw new InvalidArgumentException("Key '{$key}' contains unsupported characters"); |
||
| 27 | } |
||
| 28 | } |
||
| 29 | |||
| 44 |