Total Complexity | 3 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
11 | class GocketsException extends \Exception |
||
12 | { |
||
13 | /** |
||
14 | * @var Response |
||
15 | */ |
||
16 | protected $response; |
||
17 | |||
18 | /** |
||
19 | * GocketsException constructor. |
||
20 | * |
||
21 | * @param $response string The original json response |
||
22 | * @param string $message |
||
23 | * @param int $code |
||
24 | * @param Throwable|null $previous |
||
25 | */ |
||
26 | public function __construct(string $response, string $message = '', $code = 0, Throwable $previous = null) |
||
27 | { |
||
28 | $this->makeResponse($response); |
||
29 | |||
30 | parent::__construct($message, $code, $previous); |
||
31 | } |
||
32 | |||
33 | public function getResponse(): Response |
||
36 | } |
||
37 | |||
38 | protected function makeResponse($content): void |
||
45 |