| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function response_content_should_match(string $pattern) |
||
| 20 | { |
||
| 21 | $content = (string) $this->getResponse()->getBody(); |
||
| 22 | |||
| 23 | if (!PHPMatcher::match($content, $pattern, $error)) { |
||
| 24 | throw new InvalidArgumentException( |
||
| 25 | sprintf( |
||
| 26 | 'The response does not match with the pattern "%s" (error : %s)', |
||
| 27 | $pattern, |
||
| 28 | $error |
||
| 29 | ) |
||
| 30 | ); |
||
| 31 | } |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.