| Total Complexity | 9 |
| Total Lines | 74 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class SmsUpResponseMessage |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $status; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | private $smsId; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $custom; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | private $errorId; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | private $errorMsg; |
||
| 35 | |||
| 36 | public function __construct(array $response) |
||
| 37 | { |
||
| 38 | $this->status = $response['status']; |
||
| 39 | $this->smsId = $response['sms_id']; |
||
| 40 | $this->custom = isset($response['custom']) ? $response['custom'] : ''; |
||
| 41 | $this->errorId = isset($response['error_id']) ? $response['error_id'] : ''; |
||
| 42 | $this->errorMsg = isset($response['error_msg']) ? $response['error_msg'] : ''; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * @return string|null |
||
| 47 | */ |
||
| 48 | public function getStatus() |
||
| 49 | { |
||
| 50 | return $this->status; |
||
| 51 | } |
||
| 52 | |||
| 53 | /** |
||
| 54 | * @return string|null |
||
| 55 | */ |
||
| 56 | public function getSmsId() |
||
| 57 | { |
||
| 58 | return $this->smsId; |
||
| 59 | } |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string|null |
||
| 63 | */ |
||
| 64 | public function getCustom() |
||
| 67 | } |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string|null |
||
| 71 | */ |
||
| 72 | public function getErrorId() |
||
| 73 | { |
||
| 74 | return $this->errorId; |
||
| 75 | } |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return string|null |
||
| 79 | */ |
||
| 80 | public function getErrorMsg() |
||
| 83 | } |
||
| 84 | } |