Total Complexity | 3 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class SmsSendingFailedException extends \Exception |
||
10 | { |
||
11 | /** |
||
12 | * @var int |
||
13 | */ |
||
14 | private $statusCode; |
||
15 | |||
16 | /** |
||
17 | * @var string|null |
||
18 | */ |
||
19 | private $statusText; |
||
20 | |||
21 | public function __construct(int $statusCode, string $statusText = null, $code = 0, Throwable $previous = null) |
||
22 | { |
||
23 | $message = \sprintf('sms.ru responded with an error, status text: %s', $statusText ?? ''); |
||
24 | $this->statusCode = $statusCode; |
||
25 | $this->statusText = $statusText; |
||
26 | |||
27 | parent::__construct($message, $code, $previous); |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * @return int |
||
32 | */ |
||
33 | public function getStatusCode(): int |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * @return string|null |
||
40 | */ |
||
41 | public function getStatusText(): ?string |
||
44 | } |
||
45 | } |
||
46 |