Total Complexity | 3 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 44.44% |
Changes | 0 |
1 | <?php |
||
7 | class RequestException extends \Exception implements RequestExceptionInterface |
||
8 | { |
||
9 | protected $responseCode; |
||
10 | |||
11 | protected $message; |
||
12 | |||
13 | protected $type; |
||
14 | |||
15 | /** |
||
16 | * Request exception constructor |
||
17 | * |
||
18 | * @param string $message |
||
19 | * @param int $code |
||
20 | * @param string $type |
||
21 | * @param Throwable|null $previous |
||
22 | */ |
||
23 | 4 | public function __construct($message = "", $code = 0, $type = '', Throwable $previous = null) |
|
24 | { |
||
25 | 4 | $this->responseCode = $code; |
|
26 | 4 | $this->type = $type; |
|
27 | 4 | parent::__construct($message, $code, $previous); |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | public function getResponseCode() |
||
34 | { |
||
35 | return $this->responseCode; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | */ |
||
41 | public function getType() |
||
44 | } |
||
45 | } |
||
46 |