1 | <?php |
||
7 | class ClientException extends Exception |
||
8 | { |
||
9 | /** |
||
10 | * @var mixed |
||
11 | */ |
||
12 | protected $response; |
||
13 | |||
14 | /** |
||
15 | * @param string $message |
||
16 | * @param int $code |
||
17 | * @param array|string $response |
||
18 | * @return void |
||
|
|||
19 | */ |
||
20 | public function __construct($message, $code, $response) |
||
26 | |||
27 | /** |
||
28 | * Returns the exception's response body. |
||
29 | * |
||
30 | * @return array|string |
||
31 | */ |
||
32 | public function getResponseBody() |
||
36 | } |
||
37 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.