| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function __construct(string $pattern, string $modifiers = '') |
||
| 20 | { |
||
| 21 | $regex = sprintf('/%s/%s', str_replace('/', '\/', $pattern), $modifiers); |
||
| 22 | |||
| 23 | if (false === preg_match($regex, '')) { |
||
| 24 | throw new InvalidRegexPatternException($pattern); |
||
| 25 | } |
||
| 26 | |||
| 27 | $this->value = $regex; |
||
| 28 | } |
||
| 29 | |||
| 35 |