@@ -14,8 +14,9 @@ |
||
14 | 14 | * @throws Exception |
15 | 15 | */ |
16 | 16 | public function __construct($pattern, $description = null) { |
17 | - if (!$this->isValidRegexPattern($pattern)) |
|
18 | - throw new Exception("Invalid Regex pattern: {$pattern}"); |
|
17 | + if (!$this->isValidRegexPattern($pattern)) { |
|
18 | + throw new Exception("Invalid Regex pattern: {$pattern}"); |
|
19 | + } |
|
19 | 20 | $this->pattern = $pattern; |
20 | 21 | $this->message = $description; |
21 | 22 | } |