| Conditions | 2 |
| Paths | 2 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function response_content_should_match(string $pattern) |
||
| 27 | { |
||
| 28 | $matcher = $this->factory->createMatcher(); |
||
| 29 | $content = (string) $this->getResponse()->getBody(); |
||
| 30 | |||
| 31 | if ($matcher->match($content, $pattern)) { |
||
| 32 | return; |
||
| 33 | } |
||
| 34 | |||
| 35 | throw new InvalidArgumentException( |
||
| 36 | sprintf( |
||
| 37 | 'The response does not match with the pattern "%s" (error : %s)', |
||
| 38 | $pattern, |
||
| 39 | $matcher->getError() |
||
| 40 | ) |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..