Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function __construct( |
||
19 | ResponseInterface $response, |
||
20 | string $uniqueCode, |
||
21 | int $code = 0, |
||
22 | \Throwable $previous = null |
||
|
|||
23 | ) { |
||
24 | try { |
||
25 | $message = sprintf( |
||
26 | '%s: [status_code]: %s, [body]: %s', |
||
27 | $uniqueCode, |
||
28 | $response->getStatusCode(), |
||
29 | $response->getBody()->getContents() |
||
30 | ); |
||
31 | } catch (\Exception $previous) { |
||
32 | $message = $uniqueCode; |
||
33 | } |
||
34 | |||
35 | parent::__construct($message, $code, $previous); |
||
36 | } |
||
37 | } |
||
38 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.