| Conditions | 2 |
| Paths | 2 |
| Total Lines | 5 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | 15 | public function __construct($pattern, $description = null) { |
|
| 17 | 15 | if (!$this->isValidRegexPattern($pattern)) |
|
| 18 | 2 | throw new Exception("Invalid Regex pattern: {$pattern}"); |
|
| 19 | 13 | $this->pattern = $pattern; |
|
| 20 | 13 | $this->message = $description ?? "Must match pattern: {$pattern}"; |
|
| 21 | 13 | } |
|
| 38 | } |