| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 27 | final public function the_json_path_should_not_match(string $path, string $pattern): void |
||
| 28 | { |
||
| 29 | if (!preg_match($pattern, $this->getValue($path), $matches, PREG_OFFSET_CAPTURE)) { |
||
| 30 | // it's all good, it is supposed not to match. :} |
||
| 31 | return; |
||
| 32 | } |
||
| 33 | |||
| 34 | throw new InvalidArgumentException("The value matches {$pattern} at offset {$matches[0][1]}"); |
||
| 35 | } |
||
| 37 |