Total Complexity | 7 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
23 | class SpryngMessageResult implements SmsMessageResultInterface |
||
24 | { |
||
25 | private $message; |
||
26 | |||
27 | public function __construct(?Response $message) |
||
28 | { |
||
29 | $this->message = $message; |
||
30 | } |
||
31 | |||
32 | public function isSuccess(): bool |
||
33 | { |
||
34 | if (!$this->message) { |
||
35 | return false; |
||
36 | } |
||
37 | return $this->message->wasSuccessful(); |
||
38 | } |
||
39 | |||
40 | public function isMessageInvalid(): bool |
||
41 | { |
||
42 | if (!$this->message) { |
||
43 | return false; |
||
44 | } |
||
45 | return $this->message->serverError(); |
||
46 | } |
||
47 | |||
48 | public function getRawErrors(): array |
||
54 | } |
||
55 | } |
||
56 |