| Conditions | 4 |
| Paths | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | 4 | public function validate(Request $request) |
|
| 31 | { |
||
| 32 | try { |
||
| 33 | 4 | $this->assertRequestMatch($request, $this->schemaManager); |
|
| 34 | 4 | } catch (\RuntimeException $e) { |
|
| 35 | 3 | if ($this->strict || $e->getMessage() !== 'Request URI does not match with any swagger path definition') { |
|
| 36 | 2 | throw $e; |
|
| 37 | } |
||
| 38 | } |
||
| 39 | 2 | } |
|
| 40 | |||
| 57 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: