Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
18 | 1 | public static function serviceRespondedWithAnHttpError(ResponseInterface $response, $code, $exception) |
|
19 | { |
||
20 | 1 | $message = "Discord responded with an HTTP error: {$response->getStatusCode()}"; |
|
21 | |||
22 | 1 | if ($error = Arr::get(json_decode($response->getBody(), true), 'message')) { |
|
23 | 1 | $message .= ": $error"; |
|
24 | } |
||
25 | |||
26 | 1 | return new static($message, $code, $exception); |
|
27 | } |
||
50 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.