1 | <?php |
||
18 | final class HttpClientException extends \RuntimeException implements Exception |
||
19 | { |
||
20 | /** |
||
21 | * @var ResponseInterface|null |
||
22 | */ |
||
23 | private $response; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $responseBody; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | private $responseCode; |
||
34 | |||
35 | /** |
||
36 | * @param string $message |
||
37 | * @param int $code |
||
38 | * @param ResponseInterface|null $response |
||
39 | */ |
||
40 | 6 | public function __construct($message, $code, ResponseInterface $response = null) |
|
55 | |||
56 | 2 | public static function badRequest(ResponseInterface $response = null) |
|
60 | |||
61 | public static function unauthorized(ResponseInterface $response = null) |
||
65 | |||
66 | public static function requestFailed(ResponseInterface $response = null) |
||
70 | |||
71 | 4 | public static function notFound(ResponseInterface $response = null) |
|
75 | |||
76 | /** |
||
77 | * @return ResponseInterface |
||
78 | */ |
||
79 | public function getResponse() |
||
83 | |||
84 | /** |
||
85 | * @return array |
||
86 | */ |
||
87 | public function getResponseBody() |
||
91 | |||
92 | /** |
||
93 | * @return int |
||
94 | */ |
||
95 | public function getResponseCode() |
||
99 | } |
||
100 |
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..