Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class GPWebPayResultException extends GPWebPayException |
||
21 | { |
||
22 | private string|null $resultText; |
||
23 | private ResponseError $error; |
||
24 | |||
25 | 4 | public function __construct( |
|
26 | string $message, |
||
27 | int $prCode, |
||
28 | int $srCode, |
||
29 | ?string $resultText = null, |
||
30 | int $code = 0, |
||
31 | ?Throwable $previous = null |
||
32 | ) { |
||
33 | 4 | parent::__construct($message, $code, $previous); |
|
34 | 4 | $this->resultText = $resultText; |
|
35 | 4 | $this->error = new ResponseError($prCode, $srCode); |
|
36 | } |
||
37 | |||
38 | 2 | public function getPrcode(): int |
|
39 | { |
||
40 | 2 | return $this->error->getPrcode(); |
|
41 | } |
||
42 | |||
43 | 2 | public function getSrcode(): int |
|
46 | } |
||
47 | |||
48 | |||
49 | 2 | public function getResultText(): ?string |
|
50 | { |
||
51 | 2 | return $this->resultText; |
|
52 | } |
||
53 | |||
54 | 1 | public function translate(string $lang): string |
|
57 | } |
||
58 | } |
||
59 |