| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 4 | protected function checkResponse(ResponseInterface $response, $data) |
|
| 33 | { |
||
| 34 | 4 | $statusCode = $response->getStatusCode(); |
|
| 35 | 4 | if ($statusCode >= 400) { |
|
| 36 | 2 | throw new IdentityProviderException( |
|
| 37 | 2 | isset($data['error']['description']) ? $data['error']['description'] : $response->getReasonPhrase(), |
|
| 38 | 1 | $statusCode, |
|
| 39 | 1 | $response |
|
|
|
|||
| 40 | 1 | ); |
|
| 41 | } |
||
| 42 | 2 | } |
|
| 43 | } |
||
| 44 |
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: