| Total Complexity | 8 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 81.25% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class CampaignMonitorResponse implements ResponseInterface |
||
| 8 | { |
||
| 9 | |||
| 10 | protected \CS_REST_Wrapper_Result $response; |
||
| 11 | |||
| 12 | 1 | public function __construct(\CS_REST_Wrapper_Result $response) |
|
| 13 | { |
||
| 14 | 1 | $this->response = $response; |
|
| 15 | } |
||
| 16 | |||
| 17 | 1 | public static function init($data): static |
|
| 20 | } |
||
| 21 | |||
| 22 | public function getResponse(): \CS_REST_Wrapper_Result |
||
| 23 | { |
||
| 24 | return $this->response; |
||
| 25 | } |
||
| 26 | |||
| 27 | 1 | public function isSuccess(): bool |
|
| 28 | { |
||
| 29 | 1 | return $this->response->was_successful(); |
|
| 30 | } |
||
| 31 | |||
| 32 | 1 | public function getErrorMessage(): string |
|
| 37 | } |
||
| 38 | |||
| 39 | 1 | public function get(?string $key = null, mixed $default = null): mixed |
|
| 47 | } |
||
| 48 | } |
||
| 49 |